ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::util::CPUTimer Class Reference

#include <ITimer.h>

Collaboration diagram for onert::util::CPUTimer:

Public Member Functions

void handleBegin () override
 
void handleEnd () override
 
- Public Member Functions inherited from onert::util::ITimer
int getTime ()
 
virtual ~ITimer ()=default
 

Additional Inherited Members

- Protected Attributes inherited from onert::util::ITimer
int _timer_res {0}
 

Detailed Description

Definition at line 40 of file ITimer.h.

Member Function Documentation

◆ handleBegin()

void onert::util::CPUTimer::handleBegin ( )
inlineoverridevirtual

Implements onert::util::ITimer.

Definition at line 43 of file ITimer.h.

43{ _start_time = std::chrono::steady_clock::now(); };

◆ handleEnd()

void onert::util::CPUTimer::handleEnd ( )
inlineoverridevirtual

Implements onert::util::ITimer.

Definition at line 45 of file ITimer.h.

46 {
47 const auto end_time = std::chrono::steady_clock::now();
49 std::chrono::duration_cast<std::chrono::microseconds>(end_time - _start_time).count();
50 };

References onert::util::ITimer::_timer_res.


The documentation for this class was generated from the following file: