diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-05 19:26:58 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-05 19:26:58 +0100 |
commit | b42c9662303d1a33ebe038d1895c08945cdbd40f (patch) | |
tree | c05b169b1d28e8d42b111290f9181d2cbad1138b /src/systemtime.c | |
parent | Merge redshift.h into common.h (diff) | |
download | redshift-ng-b42c9662303d1a33ebe038d1895c08945cdbd40f.tar.gz redshift-ng-b42c9662303d1a33ebe038d1895c08945cdbd40f.tar.bz2 redshift-ng-b42c9662303d1a33ebe038d1895c08945cdbd40f.tar.xz |
Cleanup and style update (avoid typedef)
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r-- | src/systemtime.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/systemtime.c b/src/systemtime.c index f8b4794..c440c36 100644 --- a/src/systemtime.c +++ b/src/systemtime.c @@ -16,21 +16,6 @@ Copyright (c) 2010-2014 Jon Lund Steffensen <jonlst@gmail.com> */ - -#include <stdio.h> -#include <unistd.h> - -#ifndef _WIN32 -# if _POSIX_TIMERS > 0 -# include <time.h> -# else -# include <time.h> -# include <sys/time.h> -# endif -#else -# include <windows.h> -#endif - #include "common.h" @@ -47,7 +32,7 @@ systemtime_get_time(double *t) /* FILETIME is tenths of microseconds since 1601-01-01 UTC */ *t = (i.QuadPart / 10000000.0) - 11644473600.0; -#elif _POSIX_TIMERS > 0 /* POSIX timers */ +#elif defined(_POSIX_TIMERS) /* POSIX timers */ struct timespec now; int r = clock_gettime(CLOCK_REALTIME, &now); if (r < 0) { |