Changeset 93302 in vbox for trunk/src/VBox/ValidationKit/testboxscript
- Timestamp:
- Jan 18, 2022 11:25:24 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testboxscript/TestBoxHelper.cpp
r93115 r93302 146 146 uint64_t cNsInterval = nsNow - nsStat; 147 147 uint64_t cbInterval = cbWritten - cbStatWritten; 148 uint64_t cbIntervalPerSec = cbInterval ? (uint64_t)(cbInterval / (cNsInterval / (double)RT_NS_1SEC)) : 0; 148 uint64_t cbIntervalPerSec = !cbInterval ? 0 149 : (uint64_t)((double)cbInterval / ((double)cNsInterval / (double)RT_NS_1SEC)); 149 150 150 151 RTPrintf("%s: %'9RTfoff MiB out of %'9RTfoff are free after writing %'9RU64 MiB (%'5RU64 MiB/s)\n", … … 173 174 /* Issue a summary statements. */ 174 175 uint64_t cNsElapsed = RTTimeNanoTS() - nsStart; 175 uint64_t cbPerSec = cbWritten ? (uint64_t)( cbWritten / (cNsElapsed / (double)RT_NS_1SEC)) : 0;176 uint64_t cbPerSec = cbWritten ? (uint64_t)((double)cbWritten / ((double)cNsElapsed / (double)RT_NS_1SEC)) : 0; 176 177 RTPrintf("%s: Wrote %'RU64 MiB in %'RU64 s, avg %'RU64 MiB/s.\n", 177 178 pszFilename, cbWritten / _1M, cNsElapsed / RT_NS_1SEC, cbPerSec / _1M);
Note:
See TracChangeset
for help on using the changeset viewer.