import "acstime.midl";
Inheritance diagram for acstime::Timer:
Public Member Functions | |
long | schedule (in TimeoutHandler handler, in Epoch start, in Duration period) raises (ACSTimeError::ArgErrorEx) |
void | cancel (in long id) raises (ACSTimeError::InvalidIDEx) |
|
Cancels scheduled timeout(s).
|
|
Schedules timeout(s). When a timeout occurs, the handleTimeout() method of TimeoutHandler is called. There are two types of timeouts:
Here is how timeouts are used: The client creates a TimeoutHandler object and passes its reference to schedule() along with start and period. The client must then call ci.run(), i.e. go to sleep. All the work is done in the handleTimeout() method of TimeoutHandler (that is called on each timeout). The client must sleep because there is only one thread on the client-side and it is used to call the TimeoutHandler's handleTimeout() method. This is assuming the usage of a C++ SimpleClient of course. If the "client" just happens to be a component, the sleep is unnecessary.
|