new TimerClass(context, opaque, callback)
Instantiates a timer object, useful for benchmarking.
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
context |
String | Element | jQuery |
<optional> |
'body' | Container reference or query selector to create spinner within. |
opaque |
Boolean |
<optional> |
false | Whether to completely hide content behind spinner. |
callback |
function |
<optional> |
Function to call after spinner completely fades in. |
- Source:
Methods
-
elapsed() → {Number}
-
Discloses duration since timer was instantiated/reset.
- Source:
Returns:
Integer duration (ms).
- Type
- Number
-
reset() → {Number}
-
Adjusts instantiation time to now.
- Source:
Returns:
Integer timestamp (ms).
- Type
- Number
-
started() → {Number}
-
Discloses when timer was instantiated/reset.
- Source:
Returns:
Integer timestamp (ms).
- Type
- Number