summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4681275)
Changing from 1/2 second to 1/10 doesn't compromise the precision,
and a 4/10 second is worth saving.
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
#ifdef CLOCK_MONOTONIC_RAW
#define NS_PER_SEC 1E9
#ifdef CLOCK_MONOTONIC_RAW
#define NS_PER_SEC 1E9
- struct timespec sleeptime = {.tv_nsec = 5E8 }; /* 1/2 second */
+ struct timespec sleeptime = {.tv_nsec = NS_PER_SEC / 10 }; /* 1/10 second */
struct timespec t_start, t_end;
uint64_t tsc_hz;
struct timespec t_start, t_end;
uint64_t tsc_hz;