summaryrefslogtreecommitdiff
path: root/os.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-02 14:10:38 -0500
committerpommicket <pommicket@gmail.com>2023-01-02 14:10:38 -0500
commitf791aa01fad7e81223808584212c6a1a4c80ca07 (patch)
treef93d53a62035cdad7f16b97fb28c83c7acfaf14f /os.h
parentc0d0117a963cf8e4dfb28b919087d8a8ecbbca6e (diff)
finish restructuring
Diffstat (limited to 'os.h')
-rw-r--r--os.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/os.h b/os.h
index 37b7128..27b0d79 100644
--- a/os.h
+++ b/os.h
@@ -2,6 +2,8 @@
#ifndef OS_H_
#define OS_H_
+#include "base.h"
+
typedef enum {
FS_NON_EXISTENT,
FS_FILE,
@@ -55,7 +57,9 @@ static void fs_dir_entries_free(FsDirectoryEntry **entries) {
}
static double time_get_seconds(void) {
- return timespec_to_seconds(time_get());
+ struct timespec t = time_get();
+ return (double)t.tv_sec
+ + (double)t.tv_nsec * 1e-9;
}