2019-08-09 16:56:18 -04:00
|
|
|
#include <windows.h>
|
|
|
|
|
2019-08-21 15:12:19 -04:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
2019-08-09 16:56:18 -04:00
|
|
|
#include "timefuncs.h"
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
double tvals2float(struct tm *t, struct timeb *tstruct)
|
|
|
|
{
|
|
|
|
return (double)t->tm_hour * 3600 + (double)t->tm_min * 60 +
|
|
|
|
(double)t->tm_sec + (double)tstruct->millitm/1.0e3;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2019-08-21 15:12:19 -04:00
|
|
|
uint64_t i64time(void) { return 0; }
|
2019-08-09 16:56:18 -04:00
|
|
|
|
|
|
|
void sleep_ms(int ms)
|
|
|
|
{
|
2019-08-21 15:12:19 -04:00
|
|
|
if (ms < 1) {
|
2019-08-09 16:56:18 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
Sleep(ms);
|
|
|
|
}
|
|
|
|
|
|
|
|
void timeparts(int32_t *buf, double t)
|
|
|
|
{
|
|
|
|
time_t tme = (time_t)t;
|
|
|
|
struct tm *tm;
|
|
|
|
|
|
|
|
tm = localtime(&tme);
|
|
|
|
tm->tm_year += 1900;
|
|
|
|
memcpy(buf, (char *)tm, sizeof(struct tm));
|
|
|
|
}
|