// // Created by caiiiycuk on 28.02.2020. // #include #include #include #include #ifdef EMSCRIPTEN #include #else #include #endif #include #include void jsdos::initTimer() { } double now() { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); return ts.tv_sec * 1000. + ts.tv_nsec / 1000000.; } double GetMsPassedFromStart() { static double startedAt = now(); return now() - startedAt; } mstime GetTicks() { return GetMsPassedFromStart(); }