Stub time functions for Windows

Need to rethink all time stuff and read the relevant SRFIs.
This commit is contained in:
Lassi Kortela 2019-08-21 22:12:19 +03:00
parent 6ffe6bf174
commit ebefb2a519
1 changed files with 5 additions and 10 deletions

View File

@ -1,5 +1,8 @@
#include <windows.h> #include <windows.h>
#include <stdint.h>
#include <time.h>
#include "timefuncs.h" #include "timefuncs.h"
#if 0 #if 0
@ -10,19 +13,11 @@ double tvals2float(struct tm *t, struct timeb *tstruct)
} }
#endif #endif
uint64_t i64time(void) uint64_t i64time(void) { return 0; }
{
uint64_t a;
struct timeb tstruct;
ftime(&tstruct);
a = (((uint64_t)tstruct.time) << 32) + (uint64_t)tstruct.millitm;
return a;
}
void sleep_ms(int ms) void sleep_ms(int ms)
{ {
if (ms == 0) { if (ms < 1) {
return; return;
} }
Sleep(ms); Sleep(ms);