AquilaOS documentation
How it works, and its code
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. */
9int gettime(struct timespec *ts);
10
11/* Reads the wall clock in microseconds, for gettimeofday(). */
12int gettimeofday(struct timeval *tv, struct timezone *tz);
13
14/* Sets the wall clock from the real time clock again, if they drifted
15 * apart. */
16void time_resync(void);
17
18#endif /* ! _CORE_TIME_H */
int gettime(struct timespec *ts)
Reads the wall clock (CLOCK_REALTIME).
Definition time.c:29
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
int gettimeofday(struct timeval *tv, struct timezone *tz)
Reads the wall clock, in microseconds, for gettimeofday().
Definition time.c:78