time

time

factory time

Description:
  • Specifies the time management specific functions.

    • These functions are accessible via the aidesys:: prefix.

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:

  • The number of milliseconds elapsed since January 1, 1970, 00:00:00 UTC.
  • The cpu time from program start.
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