Skip to content

Commit

Permalink
fix perf_workpool nanoseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
beef9999 committed Aug 22, 2024
1 parent 72783c7 commit 7d0e9ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thread/test/perf_workpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static void workload(uint64_t time_us) {
do {
auto diff = std::chrono::steady_clock::now() - start;
diff_ns = std::chrono::duration_cast<std::chrono::nanoseconds>(diff).count();
} while (diff_ns < (long) time_us);
} while (diff_ns < (long) time_us * 1000);
}

static void task_async() {
Expand Down Expand Up @@ -143,4 +143,4 @@ int main(int argc, char** arg) {
FLAGS_fires, FLAGS_vcpu_num,
get_qps(start, end),
sum_time.load() / FLAGS_fires);
}
}

0 comments on commit 7d0e9ab

Please sign in to comment.