Skip to content

Interface: Performance ​

Defined in: types/desktop-engine.d.ts:3577

The global performance (a singleton, already created by the engine)

Properties ​

timeOrigin ​

ts
readonly timeOrigin: number;

Defined in: types/desktop-engine.d.ts:3584

When the mini program's JavaScript context was created, in milliseconds since 1970

Methods ​

now() ​

ts
now(): number;

Defined in: types/desktop-engine.d.ts:3582

Milliseconds since timeOrigin, with sub-millisecond precision, on a monotonic clock that stops while the Mac sleeps. requestAnimationFrame callbacks get times on the same clock.

Returns ​

number

The SDK is released under the Apache License 2.0