Skip to content

Commit a9bf43b

Browse files
committed
Use high_resolution_clock instead of steady_clock. Also now builds with gcc 7.2 (for comparison purposes)
llvm-svn: 322864
1 parent 4f0de28 commit a9bf43b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libcxx/fuzzing/fuzz_test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#include <iostream>
2424
#include <fstream>
25+
#include <iterator>
2526
#include <vector>
2627
#include <map>
2728
#include <chrono>
@@ -68,9 +69,9 @@ void test_one(const char *filename, FuzzProc fp)
6869
std::copy(Iter(f), Iter(), std::back_inserter(v));
6970
if (verbose)
7071
std::cout << "File '" << filename << "' contains " << v.size() << " entries" << std::endl;
71-
const auto start_time = std::chrono::steady_clock::now();
72+
const auto start_time = std::chrono::high_resolution_clock::now();
7273
int ret = fp (v.data(), v.size());
73-
const auto finish_time = std::chrono::steady_clock::now();
74+
const auto finish_time = std::chrono::high_resolution_clock::now();
7475
if (ret != 0)
7576
std::cerr << "## Failure code: " << ret << std::endl;
7677
if (verbose)

0 commit comments

Comments
 (0)