diff --git a/source/posix/clock.c b/source/posix/clock.c index 470bf7752..7da5c950c 100644 --- a/source/posix/clock.c +++ b/source/posix/clock.c @@ -45,8 +45,8 @@ static int s_legacy_get_time(uint64_t *timestamp) { return aws_raise_error(AWS_ERROR_CLOCK_FAILURE); } - uint64_t secs = (uint64_t)ts.tv_sec; - uint64_t u_secs = (uint64_t)ts.tv_usec; + uint64_t secs = (uint64_t)tv.tv_sec; + uint64_t u_secs = (uint64_t)tv.tv_usec; *timestamp = (secs * NS_PER_SEC) + (u_secs * 1000); return AWS_OP_SUCCESS; }