i was just wondering how i can use use the time to trigger something to happen.
for example, i have a raspberry pi and i programmed 2 LEDs to come on when i press a button in python. How could i programme it so they come on at 8:00AM for example?
The typical way to implement something like this is to calculate the time between now and the desired time. Set a timer to wakeup the process, then put the process to sleep. With this implementation you don't use CPU cycles while "waiting".
The typical way to implement something like this is to calculate the time between now and the desired time. Set a timer to wakeup the process, then put the process to sleep. With this implementation you don't use CPU cycles while "waiting".