move time stamps to unix file
This commit is contained in:
parent
ae2cd40db8
commit
deb9e46bdf
|
@ -51,7 +51,6 @@
|
|||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <time.h>
|
||||
#include <locale.h>
|
||||
#include <memory.h>
|
||||
#include <dlfcn.h>
|
||||
|
@ -242,20 +241,9 @@ internal void system_wait_cv(i32, i32);
|
|||
internal void system_signal_cv(i32, i32);
|
||||
|
||||
//
|
||||
// Time
|
||||
// File System
|
||||
//
|
||||
|
||||
internal
|
||||
Sys_Now_Time_Sig(system_now_time){
|
||||
struct timespec spec;
|
||||
u64 result;
|
||||
|
||||
clock_gettime(CLOCK_REALTIME, &spec);
|
||||
result = (spec.tv_sec * UINT64_C(1000000)) + (spec.tv_nsec / UINT64_C(1000));
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
internal
|
||||
Sys_File_Exists_Sig(system_file_exists){
|
||||
int result = 0;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <dirent.h>
|
||||
#include <alloca.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(USE_LOG)
|
||||
# include <stdio.h>
|
||||
|
@ -382,5 +383,17 @@ Sys_Save_File_Sig(system_save_file){
|
|||
return (size == 0);
|
||||
}
|
||||
|
||||
//
|
||||
// Time
|
||||
//
|
||||
|
||||
internal
|
||||
Sys_Now_Time_Sig(system_now_time){
|
||||
struct timespec spec;
|
||||
clock_gettime(CLOCK_REALTIME, &spec);
|
||||
u64 result = (spec.tv_sec * UINT64_C(1000000)) + (spec.tv_nsec / UINT64_C(1000));
|
||||
return(result);
|
||||
}
|
||||
|
||||
// BOTTOM
|
||||
|
||||
|
|
Loading…
Reference in New Issue