PhaseTimes beta ā
Class of @v12-engine/client
export declare class PhaseTimesHow long each phase of the frame takes, with a pair of clock reads around it (stamp, lap), and the frames that hitched: the š window's and the editor's Metrics. Off, a read is the test of a flag and nothing is kept; on, a lap is a clock read and an array write, and a frame makes nothing anew once its phases have been seen
Members ā
constructor ā
constructor(now?: () => number);Constructs a new instance of the PhaseTimes class
clear ā
clear(): void;Forgets the frames and the log: measuring starts over
enabled ā
enabled: boolean;Whether the phases are timed: on while someone looks (PerfStats.enabled)
frame ā
frame(): void;A frame begins: the one before it is done, with the time it took from its start to this one's
lap ā
lap(name: string, since: number, of?: string): number;Adds the time since since to the phase name (a part of the phase of, if it is), and gives back the clock, to chain the next lap from: t = times.lap('fog', t, 'world'). Nothing while nobody looks
sample ā
sample(): {
phases: PhaseSample[];
hitches: Hitch[];
};Each phase's time a frame over the last second, a phase followed by its parts, and the hitches, the latest last
stamp ā
stamp(): number;The clock, for a lap to be taken from: 0 while nobody looks