Skip to content

Commit

Permalink
Fix nanoseconds calculation in uuid.c
Browse files Browse the repository at this point in the history
  • Loading branch information
kovpas committed Dec 13, 2015
1 parent ea91113 commit 7444e7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uuid/uuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static inline void read_random(void *buffer, u_int numBytes) {
static inline void nanotime(struct timespec *tv) {
uint64_t now = mach_absolute_time();
tv->tv_sec = now / 1000000000;
tv->tv_nsec = (tv->tv_sec * 10000000000) - now;
tv->tv_nsec = now - (tv->tv_sec * 1000000000);
}

#elif TARGET_OS_LINUX
Expand Down

0 comments on commit 7444e7e

Please sign in to comment.