From 7a7587ad8c2c9710e3d2d4302b8172a63acad1ef Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 19 Oct 2024 17:45:09 +0000 Subject: [PATCH] utils: Correct comments in current_time_{micros,nanos} --- src/datum_utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/datum_utils.c b/src/datum_utils.c index 2a8e147..9a57102 100644 --- a/src/datum_utils.c +++ b/src/datum_utils.c @@ -128,15 +128,15 @@ uint64_t current_time_millis(void) { uint64_t current_time_micros(void) { struct timeval te; gettimeofday(&te, NULL); // get current time - uint64_t microseconds = te.tv_sec * 1000000LL + te.tv_usec; // calculate nanoseconds + uint64_t microseconds = te.tv_sec * 1000000LL + te.tv_usec; // calculate microseconds return microseconds; } uint64_t current_time_nanos(void) { struct timespec te; clock_gettime(CLOCK_REALTIME, &te); - uint64_t microseconds = te.tv_sec * 1000000000LL + te.tv_nsec; // calculate nanoseconds - return microseconds; + uint64_t nanoseconds = te.tv_sec * 1000000000LL + te.tv_nsec; // calculate nanoseconds + return nanoseconds; } unsigned char hex_lookup[65536];