From f8878d757a543fa53165084fa5ce094983a9ccc1 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 28 Dec 2022 03:48:59 +0100 Subject: [PATCH] replace NULL with 0 in time function --- Threads/OSWrapper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Threads/OSWrapper.h b/Threads/OSWrapper.h index 80b850f..f540622 100755 --- a/Threads/OSWrapper.h +++ b/Threads/OSWrapper.h @@ -34,7 +34,7 @@ void ms_to_timespec(struct timespec *ts, unsigned int ms) return; } - ts->tv_sec = (ms / 1000) + time(NULL); + ts->tv_sec = (ms / 1000) + time(0); ts->tv_nsec = (ms % 1000) * 1000000; } @@ -211,7 +211,7 @@ void ms_to_timespec(struct timespec *ts, unsigned int ms) return INFINITE; } - t = ((abstime->tv_sec - time(NULL)) * 1000) + (abstime->tv_nsec / 1000000); + t = ((abstime->tv_sec - time(0)) * 1000) + (abstime->tv_nsec / 1000000); if (t < 0) { t = 1; }