From cfcd31cee8093e1d315b626c13c12a8e410e36a1 Mon Sep 17 00:00:00 2001 From: Sara Date: Sun, 18 Jun 2023 22:17:38 +0200 Subject: [PATCH] more explicit typing and casting in timespec_to_sec --- src/engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine.c b/src/engine.c index 8b63ab2..8a5d514 100644 --- a/src/engine.c +++ b/src/engine.c @@ -13,7 +13,7 @@ static struct timespec start_last_frame; inline static double timespec_to_sec(struct timespec spec) { - return spec.tv_sec + spec.tv_nsec * 1E-09f; + return (double)spec.tv_sec + (double)spec.tv_nsec * 1E-09; } inline float delta_time() {