The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
time.h File Reference

struct timeval and gettimeofday. More...

#include <sys/types.h>
#include <sys/select.h>

Go to the source code of this file.

Data Structures

struct  timeval

Macros

#define GINNOS_TIMEVAL

Functions

int gettimeofday (struct timeval *tv, void *tz)
 the wall-clock time in seconds and microseconds since 1970.
int utimes (const char *path, const struct timeval times[2])
 set a file's access and modification times (times[0], times[1]) in microseconds; with times NULL, both to the time now.

Detailed Description

struct timeval and gettimeofday.

it also gives select() and fd_set (sys/select.h), as on other Unix systems.

Macro Definition Documentation

◆ GINNOS_TIMEVAL

#define GINNOS_TIMEVAL

Function Documentation

◆ gettimeofday()

int gettimeofday ( struct timeval * tv,
void * tz )

the wall-clock time in seconds and microseconds since 1970.

Parameters
tvreceives it.
tzmust be NULL (there are no time zones).
Returns
0, or -1 (errno set).

◆ utimes()

int utimes ( const char * path,
const struct timeval times[2] )

set a file's access and modification times (times[0], times[1]) in microseconds; with times NULL, both to the time now.

Returns
0, or -1 (errno set).