Skip to content

Interface: ManualScheduler ​

Defined in: core/scheduler.ts:20

A scheduler that moves the time only when a test tells it to.

Extends ​

Properties ​

PropertyModifierTypeDescriptionDefined in
pendingreadonlynumberThe 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 ​

ParameterTypeDescription
ms?numberThe 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 ​

ParameterType
handlenumber

Returns ​

void

Inherited from ​

Scheduler.cancel


frames() ​

ts
frames(count, ms?): void;

Defined in: core/scheduler.ts:35

Runs the given count of frames with the same interval.

Parameters ​

ParameterTypeDescription
countnumberThe number of frames.
ms?numberThe 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 ​

Scheduler.now


request() ​

ts
request(callback): number;

Defined in: core/types.ts:164

Requests a call for the next frame. Returns a handle.

Parameters ​

ParameterType
callback(now) => void

Returns ​

number

Inherited from ​

Scheduler.request