Skip to content

Commit 6f011cf

Browse files
committed
Fix wrong time conversio in performance test
1 parent 609c606 commit 6f011cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/fast_serialization_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ namespace bitstream::test::performance
2323

2424
auto end = std::chrono::steady_clock::now();
2525

26-
auto start_time = std::chrono::time_point_cast<std::chrono::microseconds>(start).time_since_epoch();
27-
auto end_time = std::chrono::time_point_cast<std::chrono::microseconds>(end).time_since_epoch();
26+
auto start_time = std::chrono::time_point_cast<std::chrono::nanoseconds>(start).time_since_epoch();
27+
auto end_time = std::chrono::time_point_cast<std::chrono::nanoseconds>(end).time_since_epoch();
2828

29-
auto time = (end - start).count();
29+
auto time = (end_time - start_time).count();
3030

31-
std::cout << " ->time spent: " << time << "us\n";
31+
std::cout << " ->time spent: " << time << "ns\n";
3232

3333
BS_TEST_ASSERT(status);
3434
}

0 commit comments

Comments
 (0)