mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:17:44 +00:00
Kernel+LibC: Share definitions for time.h and sys/stat.h
This commit is contained in:
parent
740140a661
commit
0a78056453
5 changed files with 122 additions and 123 deletions
|
@ -6,8 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <Kernel/API/POSIX/time.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
@ -42,32 +41,8 @@ void tzset();
|
|||
char* asctime(const struct tm*);
|
||||
char* asctime_r(const struct tm*, char* buf);
|
||||
|
||||
#define CLOCKS_PER_SEC 1000
|
||||
clock_t clock();
|
||||
|
||||
struct timespec {
|
||||
time_t tv_sec;
|
||||
long tv_nsec;
|
||||
};
|
||||
|
||||
typedef int clockid_t;
|
||||
|
||||
enum {
|
||||
CLOCK_REALTIME,
|
||||
#define CLOCK_REALTIME CLOCK_REALTIME
|
||||
CLOCK_MONOTONIC,
|
||||
#define CLOCK_MONOTONIC CLOCK_MONOTONIC
|
||||
CLOCK_MONOTONIC_RAW,
|
||||
#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_RAW
|
||||
CLOCK_REALTIME_COARSE,
|
||||
#define CLOCK_REALTIME_COARSE CLOCK_REALTIME_COARSE
|
||||
CLOCK_MONOTONIC_COARSE,
|
||||
#define CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_COARSE
|
||||
CLOCK_ID_COUNT,
|
||||
};
|
||||
|
||||
#define TIMER_ABSTIME 99
|
||||
|
||||
int clock_gettime(clockid_t, struct timespec*);
|
||||
int clock_settime(clockid_t, struct timespec*);
|
||||
int clock_nanosleep(clockid_t, int flags, const struct timespec* requested_sleep, struct timespec* remaining_sleep);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue