Fix system.GetTime() and SACT2.Timer_Get()

Fixes slow animations in Sengoku Rance (and presumably other games).
This commit is contained in:
Nunuhara Cabbage
2020-08-02 21:04:35 -07:00
parent 4afd54bb89
commit 6a84c8f802
+3 -1
View File
@@ -1662,7 +1662,9 @@ noreturn void _vm_error(const char *fmt, ...)
int vm_time(void)
{
return clock() / (CLOCKS_PER_SEC / 1000);
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return (ts.tv_sec * 1000) + (ts.tv_nsec / 1000000);
}
#ifdef DEBUG_HEAP