The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
time.h
Go to the documentation of this file.
1#pragma once
2
3/**
4 * @file sys/time.h
5 * @brief struct timeval and gettimeofday. it also gives select() and
6 * fd_set (sys/select.h), as on other Unix systems.
7 */
8
9#include <sys/types.h>
10
11#ifndef GINNOS_TIMEVAL
12#define GINNOS_TIMEVAL
13struct timeval
14{
15 long tv_sec;
17};
18#endif
19
20#include <sys/select.h>
21
22/**
23 * the wall-clock time in seconds and microseconds since 1970.
24 * @param tv receives it.
25 * @param tz must be NULL (there are no time zones).
26 * @return 0, or -1 (errno set).
27 */
28int gettimeofday(struct timeval *tv, void *tz);
29
30/**
31 * set a file's access and modification times (times[0], times[1]) in
32 * microseconds; with times NULL, both to the time now.
33 * @return 0, or -1 (errno set).
34 */
35int utimes(const char *path, const struct timeval times[2]);
select(), built on poll().
Definition time.h:14
long tv_sec
Definition time.h:15
suseconds_t tv_usec
Definition time.h:16
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,...
clock_t times(struct tms *buf)
the CPU times of the process and its reaped children.
basic system types.
long suseconds_t
Definition types.h:27