#include <timer.h>
Collaboration diagram for Timer:

Public Member Functions | |
| void | init () |
| void | schedule (Timer_callback &callback, unsigned milliseconds, void *argument=NULL) |
| void | unschedule (Timer_callback &callback) |
| void | reschedule (Timer_callback &callback, unsigned milliseconds) |
| unsigned | system_time () |
| void | print () |
Public Attributes | |
| Int_handler | handler |
| List< Timer_callback > | callbacks |
| unsigned volatile | cycles_per_millisecond |
Static Public Attributes | |
| const unsigned | TIMER_HZ = 1000 |
|
|
Reprogram the timer to tick at TIMER_HZ and enable the timer handler.
|
|
|
Print information about this timer.
|
|
||||||||||||
|
Reschedule the given callback so that its countdown starts again with the given number of milliseconds per cycle.
|
|
||||||||||||||||
|
Schedule the provided callback for invocation every given number of milliseconds. schedule() does not block but instead returns immediately. The callback will be invoked with the provided argument. |
|
|
Return the current system time as milliseconds since initialization.
|
|
|
Unschedule the given callback.
|
|
|
list of scheduled callbacks
|
|
|
the speed of this processor
|
|
|
timer handler
|
|
|
handler called this many times/sec
|
Torsion Operating System, Copyright (C) 2000-2004 Dan Helfman