4 ms·
How did you implement "sleep"? For timing the effects? I see a 'get_precise_time' command. I guess you could poll that, if you aren't worried about power use.
by Tempest1981 4y ago
How did you implement "sleep"? For timing the effects?
I see a 'get_precise_time' command. I guess you could poll that, if you aren't worried about power use. (LEDs using far more power than your CPU.)
- misterdata 4y agoThe interpreter will throttle the program to a certain frame rate - it will suspend the program on each ‘yield’ instruction and resume the program when a new frame is needed. It can also ignore the yields to get as high a frame rate as possible. Programs should not poll but use get_precise_time to draw what is necessary for that time stamp. (And yes, the LEDs use way more power than the CPU here)
- Tempest1981 4y agoAh, much cleaner, cool.