ref: fd1e36f98d997c8183d3040b66fa6f9cd91e825b
dir: /sys_dos.c/
#include "flisp.h"
#include "timefuncs.h"
double
sec_realtime(void)
{
return 0.0;
}
uint64_t
nanosec_monotonic(void)
{
return 0;
}
void
timestring(double s, char *buf, int sz)
{
time_t tme = (time_t)s;
struct tm tm;
localtime_r(&tme, &tm);
strftime(buf, sz, "%c", &tm);
}
double
parsetime(const char *s)
{
return -1;
}
void
sleep_ms(int ms)
{
if(ms != 0){
struct timeval timeout;
timeout.tv_sec = ms/1000;
timeout.tv_usec = (ms % 1000) * 1000;
select(0, nil, nil, nil, &timeout);
}
}
static const uint8_t boot[] = {
#include "flisp.boot.h"
};
int
main(int argc, char **argv)
{
setlocale(LC_NUMERIC, "C");
flmain(boot, sizeof(boot), argc, argv);
}