The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
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
13
struct
timeval
14
{
15
long
tv_sec
;
16
suseconds_t
tv_usec
;
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
*/
28
int
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
*/
35
int
utimes
(
const
char
*path,
const
struct
timeval
times
[2]);
select.h
select(), built on poll().
timeval
Definition
time.h:14
timeval::tv_sec
long tv_sec
Definition
time.h:15
timeval::tv_usec
suseconds_t tv_usec
Definition
time.h:16
gettimeofday
int gettimeofday(struct timeval *tv, void *tz)
the wall-clock time in seconds and microseconds since 1970.
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,...
times
clock_t times(struct tms *buf)
the CPU times of the process and its reaped children.
types.h
basic system types.
suseconds_t
long suseconds_t
Definition
types.h:27
src
libc
include
sys
time.h
Generated by
1.18.0