Commit 5952a4a5 authored by Claes Sjofors's avatar Claes Sjofors

Time, deltatime control bugfix for negative deltatimes with tv_sec = 0

parent 0e356f99
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
} while (0) } while (0)
#define notADeltaTime(p) \ #define notADeltaTime(p) \
(((p->tv_sec > 0) && (p->tv_nsec < 0 || p->tv_nsec >= 1000000000)) || \ (((p->tv_sec > 0) && (p->tv_nsec < 0 || p->tv_nsec >= 1000000000)) || \
((p->tv_sec == 0) && (p->tv_nsec <= -1000000000 || p->tv_nsec >= 1000000000)) || \
((p->tv_sec < 0) && (p->tv_nsec > 0 || p->tv_nsec <= -1000000000))) ((p->tv_sec < 0) && (p->tv_nsec > 0 || p->tv_nsec <= -1000000000)))
#define ONEDAY 86400 #define ONEDAY 86400
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment