StopWatch - Client
-
- UpdatedJan 30, 2025
- 2 minutes to read
- Yokohama
- API reference
The StopWatch API provides methods to measure the duration of operations.
You can use this API in client-side scripts using ListV2 and ListV3 APIs.
StopWatch - StopWatch()
Creates an instance of the StopWatch class.
Uses the current time as the start time.
Name | Type | Description |
---|---|---|
None |
Example
StopWatch - StopWatch(Date initialDate)
Creates an instance of the StopWatch class using the specified date as the initial value.
Name | Type | Description |
---|---|---|
initialDate | Date | The initial date for the object. |
StopWatch - getTime()
Returns the number of milliseconds since the timer started.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Number | Time since the timer started. Unit: Milliseconds |
Example
StopWatch - restart()
Resets the timer start to the current time.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
void |
Example
StopWatch - toString()
Returns the elapsed time.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | Elapsed time. Format: HH:MM:SS.SSS |