mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-03 20:29:28 -05: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
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue