2
0
mirror of https://github.com/catchorg/Catch2 synced 2026-01-25 06:52:08 +00:00
Files
Catch2/include/internal/catch_timer.cpp
2017-08-04 12:22:16 +01:00

20 lines
551 B
C++

/*
* Created by Phil on 05/08/2013.
* Copyright 2013 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include "catch_timer.h"
#include <chrono>
namespace Catch {
auto getCurrentNanosecondsSinceEpoch() -> uint64_t {
return std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();
}
} // namespace Catch