mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Utilities: Use ElapsedTimer::start_new() in disk_bechmark
This commit is contained in:
committed by
Brian Gianforcaro
parent
a2ee387683
commit
74ee7cabf2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user