gettime: for better accuracy calculate cycles_per_msec instead of cycles_per_usec
authorVincent Fu <vincent.fu@sandisk.com>
Mon, 19 Jun 2017 19:12:36 +0000 (15:12 -0400)
committerVincent Fu <vincent.fu@sandisk.com>
Wed, 21 Jun 2017 15:55:15 +0000 (11:55 -0400)
commit2aebc5a129c93498318a950fcb112be5de3e88f5
tree049891c0687526fc79c80aaaac3b231105833f4a
parent48e7b920e20864db1aadb63d08a589f3d01bc08a
gettime: for better accuracy calculate cycles_per_msec instead of cycles_per_usec

fio (before the nsec changes) would finish about 9 sec early for a 16 hour job
when relying on the CPU clock. This is because fio calculates cycles_per_usec
to carry out the clock ticks to time conversion. cycles_per_usec only provides
4 significant digits. Changing this to cycles_per_msec provides 7 significant
digits and makes the actual job run time more closely match wall time.
gettime.c