The dtcurrent() function
The dtcurrent() function assigns the current date and time to a datetime variable.
Syntax
void dtcurrent(d)
dtime_t *d;
- d
- A pointer to a datetime variable to initialize.
Usage
When the variable qualifier is set to zero (or any invalid qualifier), the dtcurrent() function initializes it with the year to fraction(3) qualifier.
When the variable contains a valid qualifier, the dtcurrent() function extends the current date and time to agree with the qualifier.
Example calls
The following
statements set the variable now to the current time, to the
nearest millisecond:
now.dt_qual = TU_DTENCODE(TU_HOUR,TU_F3);
dtcurrent(&now);