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:
The Descriptor definitions (in the respective application's KnowledgeBase)
are shown below, with the TIMERS being of the TYPE: variable.
- 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.
- CURRENT_TIME: system (local) time for the system defined time zone,
including day saving time shifts, HH:MM:SS
- CURRENT_UTC: global standard time (Zulu, UTC, GMT), HH:MM:SS
- ELAPSED_TIME, difference between CURRENT_TIME and START_TIME.
- MINUTE(number): : TRUE if the current minute from HH:MM:SS matches;
- HOUR(number): TRUE if the current hour from HH:MM:SS matches;
- 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).
RTXPS first creates dynamic knowledge base, then
sets predefined descriptors to their current values.
START_TIME and ELAPSED_TIME rely on the fact that
the first action of every course calls function init().
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
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:
see also: RTXPS functions
- addition: add_time(result,operand1,operand2)
- substraction: subst_time(result,operand1,operand2)