mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:54:58 +00:00
Utilities: Use ElapsedTimer::start_new() in disk_bechmark
This commit is contained in:
parent
a2ee387683
commit
74ee7cabf2
1 changed files with 2 additions and 4 deletions
|
@ -103,8 +103,7 @@ int main(int argc, char** argv)
|
|||
Vector<Result> results;
|
||||
|
||||
outln("Running: file_size={} block_size={}", file_size, block_size);
|
||||
Core::ElapsedTimer timer;
|
||||
timer.start();
|
||||
auto timer = Core::ElapsedTimer::start_new();
|
||||
while (timer.elapsed() < time_per_benchmark * 1000) {
|
||||
out(".");
|
||||
fflush(stdout);
|
||||
|
@ -145,8 +144,7 @@ Optional<Result> benchmark(const String& filename, int file_size, int block_size
|
|||
|
||||
Result result;
|
||||
|
||||
Core::ElapsedTimer timer;
|
||||
timer.start();
|
||||
auto timer = Core::ElapsedTimer::start_new();
|
||||
|
||||
ssize_t total_written = 0;
|
||||
for (ssize_t j = 0; j < file_size; j += block_size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue