Home | Trees | Indices | Help |
---|
|
A realtime clock.
The real clock wakes up periodically to, in turn, tell the resource manager to wake up. The real clock can also be run in a "fastforward" mode for debugging purposes (however, unlike the simulated clock, the clock will always skip a fixed amount of time into the future).
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Initializes the real clock. Arguments: manager -- the resource manager quantum -- interval between clock wakeups fastforward -- if True, the clock won't actually sleep for the duration of the quantum.
|
See docstring in base Clock class.
|
See docstring in base Clock class.
|
See docstring in base Clock class.
|
Runs the real clock through time. The clock starts when run() is called. In each iteration of the main loop it will do the following: - Wake up the resource manager - Determine if there will be anything to do before the next time the clock will wake up (after the quantum has passed). Note that this information is readily available on the slot table. If so, set next-wakeup-time to (now + time until slot table event). Otherwise, set it to (now + quantum) - Sleep until next-wake-up-time The clock keeps on tickin' until a SIGINT signal (Ctrl-C if running in the foreground) or a SIGTERM signal is received.
|
Handler for SIGTERM and SIGINT. Allows Haizea to stop gracefully. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Dec 17 10:59:20 2009 | http://epydoc.sourceforge.net |