extracted clock_gettime in order to support MACH architecture

This commit is contained in:
john30
2015-11-07 11:56:39 +01:00
parent b4f89ab5dc
commit 0045d1cec4
6 changed files with 89 additions and 4 deletions
+2 -1
View File
@@ -23,6 +23,7 @@
#include <time.h>
#include <sys/time.h>
#include <stdarg.h>
#include "clock.h"
using namespace std;
@@ -120,7 +121,7 @@ void logWrite(const LogFacility facility, const LogLevel level, const char* mess
struct timespec ts;
struct tm* tm;
clock_gettime(CLOCK_REALTIME, &ts);
clockGettime(&ts);
tm = localtime(&ts.tv_sec);
char* buf;