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:
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <iterator>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
@@ -68,9 +69,9 @@ void test_one(const char *filename, FuzzProc fp)
|
|||||||
std::copy(Iter(f), Iter(), std::back_inserter(v));
|
std::copy(Iter(f), Iter(), std::back_inserter(v));
|
||||||
if (verbose)
|
if (verbose)
|
||||||
std::cout << "File '" << filename << "' contains " << v.size() << " entries" << std::endl;
|
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());
|
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)
|
if (ret != 0)
|
||||||
std::cerr << "## Failure code: " << ret << std::endl;
|
std::cerr << "## Failure code: " << ret << std::endl;
|
||||||
if (verbose)
|
if (verbose)
|
||||||
|
|||||||
Reference in New Issue
Block a user