fm.liveswitch.ITimeoutTimer Interface Reference

A thread-safe class for running timeouts on asynchronous methods. More...

Public Member Functions

abstract void start (int timeout)
 Starts the timer. More...
 
abstract boolean stop ()
 Stops the timer, notifying the calling code if the timeout has already elapsed. More...
 

Detailed Description

A thread-safe class for running timeouts on asynchronous methods.

Member Function Documentation

◆ start()

abstract void fm.liveswitch.ITimeoutTimer.start ( int  timeout)
abstract

Starts the timer.

Parameters
timeoutThe timeout length, in milliseconds.

Implemented in fm.liveswitch.TimeoutTimer.

◆ stop()

abstract boolean fm.liveswitch.ITimeoutTimer.stop ( )
abstract

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.

Implemented in fm.liveswitch.TimeoutTimer.