fm.liveswitch.TimeoutTimer Class Reference

Public Member Functions

 TimeoutTimer (IAction1< Object > callback, Object state)
 
void start (int timeout)
 Starts the timer. More...
 
boolean stop ()
 Stops the timer, notifying the calling code if the timeout has already elapsed. More...
 

Constructor & Destructor Documentation

◆ TimeoutTimer()

fm.liveswitch.TimeoutTimer.TimeoutTimer ( IAction1< Object >  callback,
Object  state 
)

Member Function Documentation

◆ start()

void fm.liveswitch.TimeoutTimer.start ( int  timeout)

Starts the timer.

Parameters
timeoutThe timeout length, in milliseconds.

Implements fm.liveswitch.ITimeoutTimer.

◆ stop()

boolean fm.liveswitch.TimeoutTimer.stop ( )

Stops the timer, notifying the calling code if the timeout has already elapsed.

Returns
true
if the timer was successfully stopped in time;
false
if the timeout elapsed and the timeout callback has been invoked.

Implements fm.liveswitch.ITimeoutTimer.