PEP 418: Add info on notification of system power state changes

This commit is contained in:
Victor Stinner 2012-04-12 23:56:58 +02:00
parent 5aaf156f23
commit e0f6584338
1 changed files with 13 additions and 4 deletions

View File

@ -1007,6 +1007,11 @@ Resolution:
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 @@ CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW are not affected.
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 @@ sleep; sleep() is not affected by system clock update.
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