Searched hist:249632 (Results 1 - 1 of 1) sorted by relevance
/freebsd-9.3-release/usr.bin/ctlstat/ | ||
H A D | ctlstat.c | diff 249632 Fri Apr 19 02:02:26 MDT 2013 ken MFC r249334 and r249384: ------------------------------------------------------------------------ r249334 | ken | 2013-04-10 10:01:45 -0600 (Wed, 10 Apr 2013) | 11 lines Fix a time calculation error in ctlstat_standard(). ctlstat.c: When converting a timeval to a floating point number in ctlstat_standard(), cast the nanoseconds calculation to a long double, so we don't lose precision. Without the cast, we wind up with a time in whole seconds only. Sponsored by: Spectra Logic ------------------------------------------------------------------------ r249384 | ken | 2013-04-11 15:18:04 -0600 (Thu, 11 Apr 2013) | 17 lines Fix bugs in the elapsed time calculation in ctlstat_standard() pointed out by bde: - Casting to long double isn't needed. - The division isn't needed, multiplication can be used. "When 1 nanosecond is in a floating point literal, the whole expression is automatically promoted correctly." - non-KNF indentation (1 tab) for the newly split line - different non-KNF indentation (5 spaces) for the previously split line - exessive parentheses around the division operation - bogus blank line which splits up the etime initialization - general verboseness from the above. Submitted by: bde Sponsored by: Spectra Logic |
Completed in 46 milliseconds