Interface: ManualScheduler
Defined in: core/scheduler.ts:20
A scheduler that moves the time only when a test tells it to.
Extends
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
pending | readonly | number | The number of callbacks that wait for the next frame. | core/scheduler.ts:22 |
Methods
advance()
ts
advance(ms?): void;Defined in: core/scheduler.ts:28
Moves the time forward and runs the callbacks that wait for a frame.
Parameters
| Parameter | Type | Description |
|---|---|---|
ms? | number | The time between the frames. The default is one frame at 60 fps. |
Returns
void
cancel()
ts
cancel(handle): void;Defined in: core/types.ts:166
Cancels a request.
Parameters
| Parameter | Type |
|---|---|
handle | number |
Returns
void
Inherited from
frames()
ts
frames(count, ms?): void;Defined in: core/scheduler.ts:35
Runs the given count of frames with the same interval.
Parameters
| Parameter | Type | Description |
|---|---|---|
count | number | The number of frames. |
ms? | number | The time between the frames. The default is one frame at 60 fps. |
Returns
void
now()
ts
now(): number;Defined in: core/types.ts:162
Gives the current time in milliseconds.
Returns
number
Inherited from
request()
ts
request(callback): number;Defined in: core/types.ts:164
Requests a call for the next frame. Returns a handle.
Parameters
| Parameter | Type |
|---|---|
callback | (now) => void |
Returns
number