diff options
author | dzwdz | 2023-09-20 00:34:26 +0200 |
---|---|---|
committer | dzwdz | 2023-09-20 00:34:26 +0200 |
commit | a3d6aa9f8d427b86a33dc05bed98a2e88229a285 (patch) | |
tree | 2d7b29dce88b492ba357801788fd871920975a17 /ports | |
parent | 8b0953d8cdbf676cf100bcb0f77a0c82755b53ae (diff) |
ports: fix the doom port's time handling
Diffstat (limited to 'ports')
-rw-r--r-- | ports/doom/files/doomgeneric_camellia.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ports/doom/files/doomgeneric_camellia.c b/ports/doom/files/doomgeneric_camellia.c index 596e3d7..816fb51 100644 --- a/ports/doom/files/doomgeneric_camellia.c +++ b/ports/doom/files/doomgeneric_camellia.c @@ -66,15 +66,13 @@ void DG_DrawFrame(void) { dirty_flush(&d, &fb); } -static uint32_t timer = 0; void DG_SleepMs(uint32_t ms) { - timer += ms; _sys_sleep(ms); } uint32_t DG_GetTicksMs(void) { - /* if it's stupid and it works... */ - return timer; + uint32_t ret = _sys_time(0) / 1000000; + return ret; } int DG_GetKey(int *pressed, unsigned char *key) { |