use spaces instead of tab
This commit is contained in:
+11
-11
@@ -18,8 +18,8 @@
|
||||
|
||||
#include "clock.h"
|
||||
#ifdef __MACH__
|
||||
# include <mach/clock.h>
|
||||
# include <mach/mach.h>
|
||||
# include <mach/clock.h>
|
||||
# include <mach/mach.h>
|
||||
#endif
|
||||
|
||||
#ifdef __MACH__
|
||||
@@ -29,15 +29,15 @@ static clock_serv_t clockServ;
|
||||
|
||||
void clockGettime(struct timespec* t) {
|
||||
#ifdef __MACH__
|
||||
if (!clockInitialized) {
|
||||
clockInitialized = true;
|
||||
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clockServ);
|
||||
}
|
||||
mach_timespec_t mts;
|
||||
clock_get_time(clockServ, &mts);
|
||||
t->tv_sec = mts.tv_sec;
|
||||
t->tv_nsec = mts.tv_nsec;
|
||||
if (!clockInitialized) {
|
||||
clockInitialized = true;
|
||||
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clockServ);
|
||||
}
|
||||
mach_timespec_t mts;
|
||||
clock_get_time(clockServ, &mts);
|
||||
t->tv_sec = mts.tv_sec;
|
||||
t->tv_nsec = mts.tv_nsec;
|
||||
#else
|
||||
clock_gettime(CLOCK_REALTIME, t);
|
||||
clock_gettime(CLOCK_REALTIME, t);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user