TIME_UTC · xtime · xtime_get

Include the header "Dinkum/threads/xtimec.h" so that you can perform high-resolution time operations.

    /* TYPES */
typedef o-type xtime;

    /* CONSTANTS */
enum { TIME_UTC = <integer constant expression> };

    /* FUNCTIONS */
int xtime_get(xtime *, int);


enum { TIME_UTC = <integer constant expression> };

The compile-time constant is a non-zero value that designates Coordinated Universal Time (UTC) as the time base for the values set by xtime_get.


typedef struct {
    time_t sec; /* seconds since 1 Jan. 1970 00:00:00 */
    long nsec;  /* nanoseconds since time specified by sec */
    } xtime;

The struct xtime contains members that describe times with nanosecond resolution. The comment following each member desribes its meaning.


int xtime_get(xtime *xt, int base);

The function sets the xtime object pointed to by xt to hold the current time based on the time base base. If successful it returns the non-zero value base, which must be TIME_UTC; otherwise it returns 0. Note that although an xtime object describes times with nanosecond resolution the actual resolution in an xtime object is system dependent.

See also the Table of Contents and the Index.

Copyright © 1992-2013 by Dinkumware, Ltd. Portions derived from work Copyright © 2001 by William E. Kempf. All rights reserved.