Shared Tools:  Reference Manual
    Release Level 5.4 Release Date 2008 10 Revision Level 1.0
Last modified on:   Monday, 20-Jul-09 14:05 CEST


There are 3 predefined descriptors and several buil-in functions relating to time:
  1. START_TIME: start time of the current RTXPS cycle, mainly used in interactive applications such as CourseWare or the RiskWare real-time emergency management applications.
  2. CURRENT_TIME: system (local) time for the system defined time zone, including day saving time shifts,   HH:MM:SS
  3. CURRENT_UTC: global standard time (Zulu, UTC, GMT),   HH:MM:SS
  4. ELAPSED_TIME, difference between CURRENT_TIME and START_TIME.

  5. MINUTE(number): :   TRUE if the current minute from HH:MM:SS matches;
  6. HOUR(number):   TRUE if the current hour from HH:MM:SS matches;
  7. DAY(number), DAYN(string):
    • TRUE if DAY(number) argument matches the number of the day (1-31) within the current monthy.
    • TRUE if the string argument of DAY matches the three-character abbreviation for the current days name (system date function) as in SUN, MON, TUE, WED, THU, FRI, SAT, case insensitive;
    • MONTH(), MONTHM();
    • YEAR()   TRUE if the argumenrt matches the currenr year from date (YYYY).
The Descriptor definitions (in the respective application's KnowledgeBase) are shown below, with the TIMERS being of the TYPE: variable.

RTXPS first creates dynamic knowledge base, then sets predefined descriptors to their current values.

Implementation: CourseWare
START_TIME and ELAPSED_TIME rely on the fact that the first action of every course calls function init(). These descriptors can be used for computation as well as display. The behaviour of value(ELAPSED_TIME) is equivalent to header in-text function \elapsed_time and behaviour of value(CURRENT_TIME) is equivalent to header in-text function \time.

Besides user can define application specific time descriptors and set their value using rtxps function set_time(descriptor_name).

All time descriptors can be displayed with rtxps in-text function

  • \value whose format is hh:mm:ss or with rtxps in-text function
  • \valuef which displays an integer number in seconds.

There are two operations defined for time descriptors:

  • addition: add_time(result,operand1,operand2)
  • substraction: subst_time(result,operand1,operand2)
see also: RTXPS functions


© Copyright 1995-2018 by:   ESS   Environmental Software and Services GmbH AUSTRIA | print page