time: move time_t and timespec to their own includes

This commit is contained in:
Matheus
2022-10-17 11:07:46 -03:00
parent c0168df51e
commit 66d8e3b394
2 changed files with 22 additions and 7 deletions
+1 -7
View File
@@ -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;
+21
View File
@@ -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