- Inherits from:
- Object
- Declared in:
- DTimer.h
Object
|
+---DTimer
Class Description
The timer class implements a number of methods for creating and polling a
timer. Maximum resolution: << 10000 seconds. The class can also be used to
delay execution for a while.
- Last modified:
- 27-Feb-2005 (DTimer.h)
Instance Variables
- private long _now
- last timer check in msec
- private long _timeOut
- time out value in msec
- private long _remaining
- remaing msec during last timer check
- Class Methods
- + (void) delay :(long) msec
- Delay for a certain time
- Parameters:
- msec - the number of milliseconds to wait
- Constructors
- - (DTimer *) init
- Initialise a default timer
- Returns:
- the object
- - (DTimer *) init :(long) timeOut
- Initialise the timer with a timer-out value
- Parameters:
- timeOut - the time out value (in milliseconds)
- Returns:
- the object
- Members
- - (long) timeOut
- Get the time out value (in milliseconds)
- Returns:
- the time out value (0 for uninitialised)
- - (DTimer *) timeOut :(long) timeOut
- Set the time out value (in milliseconds)
- Parameters:
- timeOut - the time out value
- Returns:
- the object
- - (long) timer
- Get the timer value (time since last expire/restart)
- Returns:
- the timer (in millseconds)
- Main methods
- - (BOOL) isExpired
- Test for timer expiration; if so the timer is reset
- Returns:
- Is the timer expired
- - (BOOL) isExpired :(long) timeOut
- Test for timed expiration; if so the timer is reset
- Parameters:
- timeOut - the time out value (in milliseconds)
- Returns:
- is the timer expired ?
- - (DTimer *) restart
- Restart the timer
- Returns:
- the object
generated 25-Jul-2006 by ObjcDoc 3.0.0