Sleep() at homeJPDev@programming.dev to Programmer Humor@programming.dev – 590 points – 10 months ago30Post a CommentPreviewYou are viewing a single commentView all commentsOn microcontrollers that might be a valid approach.I've written these cycle-perfect sleep loops before. It gets really complicated if you want to account for time spent in interrupt handlers.Thankfully I didn't need high precision realtime. I just needed to wait a few seconds for serial comm.But then I gotta buy a space heater too...3 more...3 more...
On microcontrollers that might be a valid approach.I've written these cycle-perfect sleep loops before. It gets really complicated if you want to account for time spent in interrupt handlers.Thankfully I didn't need high precision realtime. I just needed to wait a few seconds for serial comm.But then I gotta buy a space heater too...3 more...3 more...
I've written these cycle-perfect sleep loops before. It gets really complicated if you want to account for time spent in interrupt handlers.Thankfully I didn't need high precision realtime. I just needed to wait a few seconds for serial comm.
Thankfully I didn't need high precision realtime. I just needed to wait a few seconds for serial comm.
On microcontrollers that might be a valid approach.
I've written these cycle-perfect sleep loops before.
It gets really complicated if you want to account for time spent in interrupt handlers.
Thankfully I didn't need high precision realtime. I just needed to wait a few seconds for serial comm.
But then I gotta buy a space heater too...