forked from NativeScript/NativeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfps-meter.d.ts
More file actions
30 lines (25 loc) · 821 Bytes
/
fps-meter.d.ts
File metadata and controls
30 lines (25 loc) · 821 Bytes
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
/**
* Allows you to capture the frames-per-second metrics of your application.
*/
declare module "fps-meter" {
/**
* Starts the frames-per-second meter.
*/
export function start(): void;
/**
* Stops the frames-per-second meter.
*/
export function stop(): void;
/**
* Returns a valid indicating whether the frames-per-second meter is currently running.
*/
export function running(): boolean;
/**
* Adds a callback function to be called each time FPS data is due to be reported. Returns an unique id which can be used to remove this callback later.
*/
export function addCallback(callback: (fps: number, minFps?: number) => void): number;
/**
* Removes the callback with the specified id.
*/
export function removeCallback(id: number);
}