DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_time_current(3udi)


Return indication of the current relative time

SYNOPSIS

#include <udi.h>

udi_timestamp_t udi_time_current ( void );
 

DESCRIPTION udi_time_current returns the current time (relative to some arbitrary starting point), in implementation-specific units. The system time resolution can be determined from the min_curtime_res field in the udi_limits_t structure.

No UDI services are provided to directly convert a udi_timestamp_t value to standard units, such as in a udi_time_t. Instead, timestamp values can be compared using udi_time_since or udi_time_between. udi_timestamp_t is a self-contained opaque type, and is therefore not transferable between regions.

In many environments, timestamp values are only useful for accurate comparisons for a limited amount of time. That is, when compared to another timestamp value they may appear to be more recent than the actual time at which they were obtained, since underlying time counters may wrap around. In all environments, udi_timestamp_t values are guaranteed to be useful for at least 24 hours.

RETURN VALUES The current time stamp is returned to the caller.

WARNINGS There are no guaranteed "invalid" values for udi_timestamp_t. In order to represent an invalid or uninitialized timestamp value, an external flag must be used.

Drivers must not assume that repeated calls to udi_time_current without returning from the driver will ever return different values; environments may choose to update the underlying time value only between calls into the driver. Delays must be implemented with timer services not timestamp services.

REFERENCES udi_time_t, udi_limits_t, udi_time_since, udi_time_between

See also Section 9.6.2.1, "Timestamp Type".


UDI Core Specification Contents