Alan Somers d1d66eac15 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
2014-05-06 22:06:39 +00:00
..
2011-05-13 16:29:57 +00:00
2013-03-15 20:12:54 +00:00
2013-10-11 20:10:18 +00:00
2013-04-28 22:52:43 +00:00
2013-06-02 17:55:00 +00:00
2013-04-27 21:59:43 +00:00
2013-04-26 17:56:35 +00:00
2010-02-15 14:07:40 +00:00
2013-03-15 20:12:54 +00:00
2012-07-15 21:12:22 +00:00