-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
44 lines (44 loc) · 1.27 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
declare class Stopwatch2 {
startTime: number;
lastStartTime: number;
execTime: number;
lastExecTime: number;
state: string;
tag: string;
static config: {
__proto__: null;
performanceMeasurement: boolean;
};
static states: {
__proto__: null;
start: string;
pause: string;
stop: string;
};
constructor(tag: string);
start(): Stopwatch2;
pause(): Stopwatch2;
stop(): Stopwatch2;
sleep(ms: number): void;
toString(): string;
static start(...tags: string[]): Stopwatch2[];
static pause(...tags: string[]): Stopwatch2[];
static stop(...tags: string[]): Stopwatch2[];
/**
* Suspends the execution
* @param {number} ms Number of millisecond
*/
static sleep(ms: number): void;
static toString(...tags: string[]): string;
static clear(): boolean;
/**
* Register the stopwatch2 to global with the given name.
* @param {string} globalName global name
*/
static registerToGlobal(globalName: string): boolean;
static create(...tags: string[]): Stopwatch2[];
static getArray(...tags: string[]): Stopwatch2[];
static getOne(tag: string): Stopwatch2 | null;
static get(...tags: string[]): Object;
}
export default Stopwatch2;