factory time
- Description:
Specifies the time management specific functions.
- These functions are accessible via the
aidesys::
prefix.
- These functions are accessible via the
Methods
(static) sleep(delay)
- Description:
Sleeps allowing other threads to proceed.
Parameters:
Name | Type | Description |
---|---|---|
delay |
uint | The delay in milliseconds. |
(static) now(daytimeopt, relativeopt) → {double}
- Description:
Gets the cpu or real time from program start.
- The following construct measures the calculation time of a given calculation:
aidesys::now(false, false); calculation(); printf("calculus duration in msec : %.3f\n", aidesys::now(false, true));
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
daytime |
bool |
<optional> |
true
|
If true considers real time, if false consider cpu time. |
relative |
bool |
<optional> |
false
|
If true returns the relative time between two calls of now(), else returns either:
|
Returns:
The time in milli-seconds, with maximal of micro-second precision.
- Type
- double
(static) nowISO() → {string}
- Description:
Returns the present date and time, with one second precision, following the ISO8601 norm.
Returns:
The date and time in the '%Y-%m-%dT%H:%M:%S' format.
- Type
- string