Commit d1ba9d64 authored by Laurent Belcour's avatar Laurent Belcour

Correction of a bug on MacOS

parent eba09fe5
......@@ -4,6 +4,7 @@
#include <windows.h>
#include <winbase.h>
#else
#include <sys/time.h>
#include <sys/times.h>
#include <sys/types.h>
#include <limits.h>
......@@ -158,9 +159,9 @@ unsigned int timer::current_time() const
GetSystemTime(&res);
return (unsigned int)(res.wSecond + res.wMinute*60 + res.wHour*360);
#elif defined(__APPLE__)
struct timespec _time;
gettimeofday(&_time, NULL);
return (unsigned int)_time.tv_sec;
struct timeval _time;
gettimeofday(&_time, NULL);
return (unsigned int)_time.tv_sec;
#else
struct timespec _time;
clock_gettime(CLOCK_MONOTONIC, &_time);
......
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