Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
report_time Struct Reference

Public Member Functions

 report_time (std::string desc)
 
void report ()
 

Public Attributes

const std::chrono::high_resolution_clock::time_point _start
 
const std::string _desc
 

Detailed Description

Definition at line 57 of file main.cpp.

Constructor & Destructor Documentation

◆ report_time()

report_time::report_time ( std::string desc)
inline

Definition at line 58 of file main.cpp.

59 : _start(std::chrono::high_resolution_clock::now())
60 , _desc(desc) {
61 }
const std::chrono::high_resolution_clock::time_point _start
Definition main.cpp:68
const std::string _desc
Definition main.cpp:69

Member Function Documentation

◆ report()

void report_time::report ( )
inline

Definition at line 63 of file main.cpp.

63 {
64 const auto duration = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - _start).count() / 1000;
65 ilog("sysio-blocklog - ${desc} took ${t} msec", ("desc", _desc)("t", duration));
66 }
#define ilog(FORMAT,...)
Definition logger.hpp:118
Here is the caller graph for this function:

Member Data Documentation

◆ _desc

const std::string report_time::_desc

Definition at line 69 of file main.cpp.

◆ _start

const std::chrono::high_resolution_clock::time_point report_time::_start

Definition at line 68 of file main.cpp.


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