.Modelica.Utilities.System.getTime

Information

Syntax

(ms, sec, min, hour, day, mon, year) = System.getTime();

Description

Returns the local time at the time instant this function was called. All returned values are of type Integer and have the following meaning:

Argument Range Description
ms 0 .. 999 Milli-seconds after seconds
sec 0 .. 59 Seconds after minute
min 0 .. 59 Minutes after hour
hour 0 .. 23 Hours after midnight
day 1 .. 31 Day of month
mon 1 .. 12 Current month
year ≥ 2015 Current year

Example

(ms, sec, min, hour, mon, year) = getTime()   // = (281, 30, 13, 10, 15, 2, 2015)
                                              // Feb. 15, 2015 at 10:13 after 30.281 s

Note

This function is impure!

Interface

function getTime
  extends Modelica.Icons.Function;
  output Integer ms "Millisecond";
  output Integer sec "Second";
  output Integer min "Minute";
  output Integer hour "Hour";
  output Integer day "Day";
  output Integer mon "Month";
  output Integer year "Year";
end getTime;

Revisions

Date Description
June 22, 2015
Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
DLR Institute of System Dynamics and Control

Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39