summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2014-05-06 22:06:39 +0000
committerasomers <asomers@FreeBSD.org>2014-05-06 22:06:39 +0000
commitc9e9fdb2a1af4451fc0fff4e3bad8c43e47305c1 (patch)
treea78744ab8c4dbf1758a6ebb06f3b0f84ca6fd7a6 /contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
parentf10e28b41fb321b32c2b40e964d002b0cd1cc51a (diff)
downloadFreeBSD-src-c9e9fdb2a1af4451fc0fff4e3bad8c43e47305c1.zip
FreeBSD-src-c9e9fdb2a1af4451fc0fff4e3bad8c43e47305c1.tar.gz
dd(1) uses gettimeofday(2) to compute the throughput statistics. However,
gettimeofday returns the system clock, which may jump forward or back, especially if NTP is in use. If the time jumps backwards, then dd will see negative elapsed time, round it up to 1usec, and print an absurdly fast transfer rate. The solution is to use clock_gettime(2) with CLOCK_MONOTONIC_PRECISE as the clock_id. That clock advances steadily, regardless of changes to the system clock. Reviewed by: delphij MFC after: 3 days Sponsored by: Spectra Logic
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud