From 3c3e9e2c62ad9a83ab9b0e1255204d57894c20ff Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Tue, 29 Oct 2024 20:51:36 -0600 Subject: host alarmclock --- libhw/host_sigrt.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libhw/host_sigrt.h') diff --git a/libhw/host_sigrt.h b/libhw/host_sigrt.h index fa5675b..e8be26a 100644 --- a/libhw/host_sigrt.h +++ b/libhw/host_sigrt.h @@ -35,13 +35,13 @@ static inline host_ns_time_t ns_to_host_ns_time(uint64_t time_ns) { } static inline uint64_t ns_from_host_us_time(host_us_time_t host_time) { - return (((uint64_t)ts.tv_sec) * NS_PER_S) + - ((uint64_t)ts.tv_nsec * (NS_PER_S/US_PER_S)); + return (((uint64_t)host_time.tv_sec) * NS_PER_S) + + ((uint64_t)host_time.tv_usec * (NS_PER_S/US_PER_S)); } static inline uint64_t ns_from_host_ns_time(host_ns_time_t host_time) { - return (((uint64_t)ts.tv_sec) * NS_PER_S) + - ((uint64_t)ts.tv_nsec); + return (((uint64_t)host_time.tv_sec) * NS_PER_S) + + ((uint64_t)host_time.tv_nsec); } #endif /* _LIBHW_HOST_SIGRT_H_ */ -- cgit v1.2.3-2-g168b