mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 06:37:08 +00:00
nicer gettimeofday error handling.
git-svn-id: file:///svn/unbound/trunk@4071 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
29ac62d7b0
commit
fadd01e93e
@ -139,9 +139,10 @@ dnscrypt_hrtime(void)
|
||||
int ret;
|
||||
|
||||
ret = gettimeofday(&tv, NULL);
|
||||
assert(ret == 0);
|
||||
if (ret == 0) {
|
||||
ts = (uint64_t)tv.tv_sec * 1000000U + (uint64_t)tv.tv_usec;
|
||||
} else {
|
||||
log_err("gettimeofday: %s", strerror(errno));
|
||||
}
|
||||
return ts;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user