mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
time: move time_t and timespec to their own includes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define _STAT_H_INCLUDE
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
||||
#define TYPE_FIFO 1
|
||||
#define TYPE_CHARDEV 2
|
||||
@@ -15,13 +16,6 @@
|
||||
#define GETTYPE(m) ((m >> 12) & 0xF)
|
||||
#define MAKETYPE(m) ((m & 0xF) << 12)
|
||||
|
||||
typedef long time_t;
|
||||
|
||||
struct timespec {
|
||||
time_t tv_sec;
|
||||
long tv_nsec;
|
||||
};
|
||||
|
||||
|
||||
typedef struct {
|
||||
dev_t st_dev;
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef _TIME_H_INCLUDE
|
||||
#define _TIME_H_INCLUDE
|
||||
|
||||
#define NS_IN_SECS 1000000000
|
||||
#define US_IN_SECS 1000000
|
||||
#define MS_IN_SECS 1000
|
||||
|
||||
#define US_IN_MS 1000
|
||||
#define NS_IN_MS 1000000
|
||||
|
||||
#define NS_IN_US 1000
|
||||
|
||||
typedef long time_t;
|
||||
|
||||
struct timespec {
|
||||
time_t tv_sec;
|
||||
long tv_nsec;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user