2023-05-26 22:21:07 +03:00
|
|
|
#ifndef _SYS_TIME_H
|
|
|
|
#define _SYS_TIME_H 1
|
|
|
|
|
|
|
|
// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_time.h.html
|
|
|
|
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
|
|
|
|
__BEGIN_DECLS
|
|
|
|
|
2023-06-02 17:29:09 +03:00
|
|
|
// NOTE: select is declared from here
|
2023-05-26 22:21:07 +03:00
|
|
|
#include <sys/select.h>
|
|
|
|
|
2024-02-12 17:26:33 +02:00
|
|
|
#include <bits/types/timeval.h>
|
2023-05-26 22:21:07 +03:00
|
|
|
|
|
|
|
struct itimerval
|
|
|
|
{
|
|
|
|
struct timeval it_interval; /* Timer interval. */
|
|
|
|
struct timeval it_value; /* Current value. */
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ITIMER_REAL 0
|
|
|
|
#define ITIMER_VIRTUAL 1
|
|
|
|
#define ITIMER_PROF 2
|
|
|
|
|
2024-12-02 08:27:38 +02:00
|
|
|
struct timezone
|
|
|
|
{
|
|
|
|
int tz_minuteswest; /* minutes west of Greenwich */
|
|
|
|
int tz_dsttime; /* type of DST correction */
|
|
|
|
};
|
|
|
|
|
2023-05-26 22:21:07 +03:00
|
|
|
int getitimer(int which, struct itimerval* value);
|
|
|
|
int gettimeofday(struct timeval* __restrict tp, void* __restrict tzp);
|
|
|
|
int setitimer(int which, const struct itimerval* __restrict value, struct itimerval* __restrict ovalue);
|
|
|
|
int utimes(const char* path, const struct timeval times[2]);
|
|
|
|
|
|
|
|
__END_DECLS
|
|
|
|
|
|
|
|
#endif
|