Use high_resolution_clock instead of steady_clock. Also now builds with gcc 7.2 (for comparison purposes)

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2018-01-18 17:01:34 +00:00
parent ad7b096282
commit 226431c0d7

View File

@@ -22,6 +22,7 @@
#include <iostream>
#include <fstream>
#include <iterator>
#include <vector>
#include <map>
#include <chrono>
@@ -68,9 +69,9 @@ void test_one(const char *filename, FuzzProc fp)
std::copy(Iter(f), Iter(), std::back_inserter(v));
if (verbose)
std::cout << "File '" << filename << "' contains " << v.size() << " entries" << std::endl;
const auto start_time = std::chrono::steady_clock::now();
const auto start_time = std::chrono::high_resolution_clock::now();
int ret = fp (v.data(), v.size());
const auto finish_time = std::chrono::steady_clock::now();
const auto finish_time = std::chrono::high_resolution_clock::now();
if (ret != 0)
std::cerr << "## Failure code: " << ret << std::endl;
if (verbose)