X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FTimer.cc;fp=src%2FMoof%2FTimer.cc;h=a4dcf4047dfcc591f327accff93fa46039f7febc;hp=733f54ca7f6326a826b0a5013cd1904a94cab4ac;hb=cfe38a72ab859538db6269bc9b97f55e8f1f8709;hpb=9d0add74a28da0a1c24430eee52d41a7d367f857 diff --git a/src/Moof/Timer.cc b/src/Moof/Timer.cc index 733f54c..a4dcf40 100644 --- a/src/Moof/Timer.cc +++ b/src/Moof/Timer.cc @@ -30,6 +30,8 @@ #include #include +#include + #include "Log.hh" #include "Timer.hh" @@ -37,8 +39,6 @@ #include "config.h" #endif -#include - 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; }