AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
time.h
Go to the documentation of this file.
1
#ifndef _CORE_TIME_H
2
#define _CORE_TIME_H
3
4
#include <
core/types.h
>
5
6
/* The wall clock (core/time.c). */
7
8
/* Reads the wall clock. */
9
int
gettime
(
struct
timespec
*ts);
10
11
/* Reads the wall clock in microseconds, for gettimeofday(). */
12
int
gettimeofday
(
struct
timeval
*tv,
struct
timezone
*tz);
13
14
/* Sets the wall clock from the real time clock again, if they drifted
15
* apart. */
16
void
time_resync
(
void
);
17
18
#endif
/* ! _CORE_TIME_H */
timespec
Definition
types.h:30
timeval
Definition
types.h:35
timezone
Definition
types.h:40
gettime
int gettime(struct timespec *ts)
Reads the wall clock (CLOCK_REALTIME).
Definition
time.c:29
time_resync
void time_resync(void)
Sets the wall clock from the real time clock again, if they are 2 seconds or more apart.
Definition
time.c:54
gettimeofday
int gettimeofday(struct timeval *tv, struct timezone *tz)
Reads the wall clock, in microseconds, for gettimeofday().
Definition
time.c:78
types.h
kernel
include
core
time.h
Generated by
1.18.0