From a4e782b24f912e26396a94ceed35856da5afc1a1 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 25 Jul 2013 18:01:21 +0200 Subject: [PATCH 1/1] Use exponential notation for big multiples of 10 --- fps-limit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fps-limit.c b/fps-limit.c index 3ed784f..a5d00a7 100644 --- a/fps-limit.c +++ b/fps-limit.c @@ -34,7 +34,7 @@ #define FPS 60 -#define NSEC_PER_SEC 1000000000 +#define NSEC_PER_SEC 1e9 #define timespecsub(a, b, result) \ do { \ @@ -42,7 +42,7 @@ (result)->tv_nsec = (a)->tv_nsec - (b)->tv_nsec; \ if ((result)->tv_nsec < 0) { \ --(result)->tv_sec; \ - (result)->tv_nsec += 1000000000; \ + (result)->tv_nsec += 1e9; \ } \ } while(0) -- 2.1.4