C# Class llbc.Timer

Timer class.
显示文件 Open project: lailongwei/llbc Class Usage Examples

Public Methods

Method Description
Cancel ( ) : void

Cancel timer.

Schedule ( TimeoutHandler timeoutHandler, System.DateTime firstTimeoutTime, double period = 0.0, TimerCancelHandler cancelHandler = null ) : Timer

Schedule timer, same with Non-Static Schedule(DateTime, double) method.

Schedule ( TimeoutHandler timeoutHandler, double dueTime, double period = 0.0, TimerCancelHandler cancelHandler = null ) : Timer

Schedule timer, same with Non-Static Schedule(double, double) method.

Schedule ( System.DateTime firstTimeoutTime, double period = 0.0 ) : void

Schedule timer.

Schedule ( double dueTime, double period = 0.0 ) : void

Schedule timer.

Timer ( TimeoutHandler timeoutHandler, TimerCancelHandler cancelHandler = null ) : System

Construct new timer.

Private Methods

Method Description
_OnCancel ( ) : void
_OnTimeout ( ) : int

Method Details

Cancel() public method

Cancel timer.
public Cancel ( ) : void
return void

Schedule() public static method

Schedule timer, same with Non-Static Schedule(DateTime, double) method.
public static Schedule ( TimeoutHandler timeoutHandler, System.DateTime firstTimeoutTime, double period = 0.0, TimerCancelHandler cancelHandler = null ) : Timer
timeoutHandler TimeoutHandler Timeout handler
firstTimeoutTime System.DateTime first timeout time
period double period, in seconds
cancelHandler TimerCancelHandler timer cancel handler
return Timer

Schedule() public static method

Schedule timer, same with Non-Static Schedule(double, double) method.
public static Schedule ( TimeoutHandler timeoutHandler, double dueTime, double period = 0.0, TimerCancelHandler cancelHandler = null ) : Timer
timeoutHandler TimeoutHandler Timeout handler
dueTime double dueTime, in seconds
period double period, in seconds
cancelHandler TimerCancelHandler timer cancel handler
return Timer

Schedule() public method

Schedule timer.
public Schedule ( System.DateTime firstTimeoutTime, double period = 0.0 ) : void
firstTimeoutTime System.DateTime first timeout time, absolute time
period double period, in seconds, default is 0.0, means same with (firstTimeoutTime - DateTime.Now)
return void

Schedule() public method

Schedule timer.
public Schedule ( double dueTime, double period = 0.0 ) : void
dueTime double dueTime, in seconds
period double period, in seconds, default is 0.0, means same with dueTime
return void

Timer() public method

Construct new timer.
public Timer ( TimeoutHandler timeoutHandler, TimerCancelHandler cancelHandler = null ) : System
timeoutHandler TimeoutHandler timeout handler
cancelHandler TimerCancelHandler timer cancel handler, optional
return System