powernap

Powernap is a small Python extension for accurate sleeping.
Download

powernap Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • James Shuttleworth
  • Publisher web site:
  • http://dis-dot-dat.net/index.cgi?item=code/todo2html/

powernap Tags


powernap Description

Powernap is a small Python extension for accurate sleeping. 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 Related Software