freebsd-skq/bin/dd
asomers c9e9fdb2a1 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
..
args.c Implement GNU's extension of 'status' operand. The GNU syntax is 2014-04-03 00:55:16 +00:00
conv_tab.c Make dd's signal handler async safe. 2013-05-10 18:43:36 +00:00
conv.c Minor comment fix. 2014-05-03 09:06:11 +00:00
dd.1 Implement GNU's extension of 'status' operand. The GNU syntax is 2014-04-03 00:55:16 +00:00
dd.c dd(1) uses gettimeofday(2) to compute the throughput statistics. However, 2014-05-06 22:06:39 +00:00
dd.h Minor comment fix: dbsz is the block size as set by bs/ibs/obs, 2014-05-03 09:07:02 +00:00
extern.h Make C_* contants fit in 32 bits again by using 4 unused bits. 2014-04-03 06:32:02 +00:00
gen.c
Makefile
misc.c dd(1) uses gettimeofday(2) to compute the throughput statistics. However, 2014-05-06 22:06:39 +00:00
position.c Make dd's signal handler async safe. 2013-05-10 18:43:36 +00:00
ref.ascii
ref.ebcdic
ref.ibm
ref.lcase
ref.oldascii
ref.oldebcdic
ref.oldibm
ref.pareven
ref.parnone
ref.parodd
ref.parset
ref.swab
ref.ucase