]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Timer.cc
sleep forever bug fixed
[chaz/yoink] / src / Moof / Timer.cc
index 733f54ca7f6326a826b0a5013cd1904a94cab4ac..a4dcf4047dfcc591f327accff93fa46039f7febc 100644 (file)
@@ -30,6 +30,8 @@
 #include <ctime>
 #include <limits>
 
+#include <SDL/SDL.h>
+
 #include "Log.hh"
 #include "Timer.hh"
 
@@ -37,8 +39,6 @@
 #include "config.h"
 #endif
 
-#include <SDL/SDL.h>
-
 
 namespace Mf {
 
@@ -194,7 +194,8 @@ Scalar Timer::getTicks()
 {
        struct timespec ts;
 
-       ASSERT(clock_gettime(CLOCK_MONOTONIC, &ts) == 0 && "cannot access clock");
+       int result = clock_gettime(CLOCK_MONOTONIC, &ts);
+       ASSERT(result == 0 && "cannot access clock");
 
        return Scalar(ts.tv_sec - reference) + Scalar(ts.tv_nsec) / 1000000000.0;
 }
This page took 0.016076 seconds and 4 git commands to generate.