powernap 30 review

Download
by rbytes.net on

Powernap is a small Python extension for accurate sleeping

License: GPL (GNU General Public License)
File size: 8K
Developer: James Shuttleworth
0 stars award from rbytes.net

Powernap is a small Python extension for accurate sleeping. Python's time.sleep() function is fairly inaccurate. It is definitely not accurate enough for music, games, or graphics. powernap can sleep too long or too short, and usually does.

Using Linux's real-time clock (RTC) allows for more accurate timing. This extension wraps all the messy RTC stuff and provides nap(), which performs the same job as sleep(), but more accurately.

Even more usefully, it provides rnap(), which is a padding nap. That is, if you call rnap(30), it will nap for however many milliseconds are required to make the time since the last nap 30 milliseconds. rtc_on() sets up the real-time clock, and rtc_off() turns it off. It also switches the scheduler to SCHED_FIFO.

What's New in This Release:
This is the second public release.
Most of the timing was moved into the C extension.
rnap(), the rolling padding nap, is provided.

powernap 30 search tags