[Python-checkins] peps: PEP 418: Add info on notification of system power state changes

victor.stinner python-checkins at python.org
Fri Apr 13 00:00:13 CEST 2012


http://hg.python.org/peps/rev/1e585cd8a059
changeset:   4237:1e585cd8a059
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Apr 12 23:56:58 2012 +0200
summary:
  PEP 418: Add info on notification of system power state changes

files:
  pep-0418.txt |  17 +++++++++++++----
  1 files changed, 13 insertions(+), 4 deletions(-)


diff --git a/pep-0418.txt b/pep-0418.txt
--- a/pep-0418.txt
+++ b/pep-0418.txt
@@ -1007,6 +1007,11 @@
 The system time can be set using settimeofday() or
 clock_settime(CLOCK_REALTIME).
 
+Alexander Shishkin proposed an API for Linux to be notified when the system
+clock is changed: `timerfd: add TFD_NOTIFY_CLOCK_SET to watch for clock changes
+<http://lwn.net/Articles/432395/>`_ (4th version of the API, March 2011). The
+API is not accepted yet, CLOCK_BOOTTIME provides a similar feature.
+
 
 Process time
 ------------
@@ -1150,9 +1155,10 @@
 Other operating systems
 -----------------------
 
-On Windows, GetTickCount() and GetTickCount64() include time the
-system spends in sleep; sleep() is not affected by system clock
-update.
+On Windows, GetTickCount() and GetTickCount64() include time the system spends
+in sleep; sleep() is not affected by system clock update. The WM_POWERBROADCAST
+message is send to Windows application to notify them of power-management
+events (ex: ower status has changed).
 
 On FreeBSD 8, CLOCK_MONOTONIC include time the system spends in sleep;
 sleep() is not affected by system clock update.
@@ -1162,7 +1168,10 @@
 
 On Mac OS X, mach_absolute_time() include time the system spends in
 sleep; sleep() is not affected by system clock update.  Sleep is
-interrupted during suspend.
+interrupted during suspend. Read also: `Registering and unregistering for sleep
+and wake notifications
+<http://developer.apple.com/library/mac/#qa/qa1340/_index.html>`_ (Technical
+Q&A QA1340).
 
 
 Sleeping

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list