Private
c_Private
Optional
Readonly
callbackPrivate
t_When the Timer expires, the current time will be sent on c
Private
_sendPrivate
_startStop prevents the Timer from firing.
Stop does not close the channel, to prevent a read from the channel succeeding incorrectly.
To ensure the channel is empty after a call to Stop, check the return value and drain the channel. For example, assuming the program has not received from t.C already:
if (!t.Stop()) {
t.c.tryRead()
}
It returns true if the call stops the timer, false if the timer has already expired or been stopped.
Generated using TypeDoc
Timer that will send the current time on its channel after at least duration millisecond.