Members
(static, constant) expiredTicket :Ticket
An expired Ticket.
Type:
Methods
(static) schedule(func, time) → {Ticket}
- Description:
Schedule a one-off timer.
When the callback is invoked,
thiswill refer to theTicketinstance.If any variables need to be passed into this function then it's best to do this via
JavaScript closures.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
func |
function | the function to be invoked once the specified time has elapsed. |
time |
Number | the number of milliseconds before the event is run. |
Returns:
a new Ticket for the scheduled event.
- Type
- Ticket
(static) schedulePeriodically(func, time) → {IntervalTicket}
- Description:
Schedule a periodic timer.
When the callback is invoked,
thiswill refer to the Ticket instance.If any variables need to be passed into this function then it's best to do this via
JavaScript closures.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
func |
function | the function to be invoked each time the specified time has elapsed. |
time |
Number | the number of milliseconds before the event is run. |
Returns:
a new Ticket for the scheduled event.
- Type
- IntervalTicket
(static) ticks() → {Number}
- Description:
Returns the number of Clock ticks on the system.
This method is typically used for profiling.
- Source:
Returns:
the number of Clock ticks on the system.
- Type
- Number