Skip to content

Instantly share code, notes, and snippets.

export class HighResolutionTimer {
private totalTicks = 0;
private timer: number | undefined;
private startTime: number | undefined;
private currentTime: number | undefined;
private deltaTime = 0;
constructor(public duration: number, public callback: (timer: HighResolutionTimer) => void) {
}