X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvppinfra%2Felog.c;h=a86fadeaa39eefccd86973f9f0843a6ac9d610d3;hb=8b9525c21d4e3ea518b3544ea3d9aa3e514d45b0;hp=182ca127b12043f9769824f5936fb13da53851ac;hpb=12c6fdc551d2a092dc530639365d9e4ad8493d97;p=vpp.git diff --git a/src/vppinfra/elog.c b/src/vppinfra/elog.c index 182ca127b12..a86fadeaa39 100644 --- a/src/vppinfra/elog.c +++ b/src/vppinfra/elog.c @@ -413,7 +413,11 @@ elog_time_now (elog_time_stamp_t * et) #ifdef CLIB_UNIX { #include +#ifdef __APPLE__ + clock_gettime (CLOCK_REALTIME, &ts); +#else syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts); +#endif cpu_time_now = clib_cpu_time_now (); /* Subtract 3/30/2017's worth of seconds to retain precision */ os_time_now_nsec = 1e9 * (ts.tv_sec - 1490885108) + ts.tv_nsec; @@ -732,7 +736,7 @@ elog_merge (elog_main_t * dst, u8 * dst_tag, elog_main_t * src, u8 * src_tag, /* * Move the earlier set of events later, to avoid creating - * events which preceed the Big Bang (aka have negative timestamps). + * events which precede the Big Bang (aka have negative timestamps). * * Not to any scale, we have something like the following picture: *