TIME Prototype

[ return to article ]

The TIME function returns the current time into a TIME_T structure. .

Prototype

.....DName+++++++++++EUDS.......Length+TDc.Functions++++++++++++++++++++++++++++
     D time            PR            10I 0 Extproc('time')
     D  time_t                             Like(time_t)


The first parameter is a TIME_T structure. A TIME_T data structure is simple 4-byte integer stored as the only subfield of a data structure. You can actually pass a 10i0 value to TIME instead of a TIME_T structure.

Use TIME to retrieve the current date/time value.

The return value is the time_t value. Effectively, the procedure updates the parameter value with the new time, and also returns the current time. This allows the procedure to return the time and have it assigned to a variable in an assignment expression, or used in comparison expressions.