diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-29 20:51:36 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-29 20:51:36 -0600 |
commit | 3c3e9e2c62ad9a83ab9b0e1255204d57894c20ff (patch) | |
tree | 3ad8898edb89eba0e62ac0c27487949bfa72c135 /libhw/host_sigrt.h | |
parent | 6c114930eef133293856189a93f7ca7ca3751268 (diff) |
host alarmclock
Diffstat (limited to 'libhw/host_sigrt.h')
-rw-r--r-- | libhw/host_sigrt.h | 8 |
1 files changed, 4 insertions, 4 deletions
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_ */ |