ArmNN
 24.02
Timer.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <chrono>
9 #include <iomanip>
10 
11 namespace armnn
12 {
13 
14 inline std::chrono::high_resolution_clock::time_point GetTimeNow()
15 {
16  return std::chrono::high_resolution_clock::now();
17 }
18 
19 inline std::chrono::duration<double, std::milli> GetTimeDuration(
20  std::chrono::high_resolution_clock::time_point start_time)
21 {
22  return std::chrono::duration<double, std::milli>(GetTimeNow() - start_time);
23 }
24 
25 }
armnn::GetTimeNow
std::chrono::high_resolution_clock::time_point GetTimeNow()
Definition: Timer.hpp:14
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::GetTimeDuration
std::chrono::duration< double, std::milli > GetTimeDuration(std::chrono::high_resolution_clock::time_point start_time)
Definition: Timer.hpp:19