timespec_to_sec now first multiplies tv_nsec by 1E-09 to convert to seconds

pull/8/head
Sara 2023-06-18 18:04:49 +02:00
parent 56679110e3
commit a49ac0db93
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ static struct timespec start_last_frame;
inline static inline static
double timespec_to_sec(struct timespec spec) { double timespec_to_sec(struct timespec spec) {
return spec.tv_sec + spec.tv_nsec; return spec.tv_sec + spec.tv_nsec * 1E-09f;
} }
inline float delta_time() { inline float delta_time() {