timer.h
Go to the documentation of this file.
1 
9 #pragma once
10 #include <ctime>
11 
12 namespace illumina { namespace interop { namespace util
13 {
14 
16  {
17  public:
18  scoped_timer(double& duration) : m_start(std::clock()), m_duration(duration){}
19  ~scoped_timer(){m_duration = (std::clock()-m_start) / static_cast<double>(CLOCKS_PER_SEC);}
20  private:
21  std::clock_t m_start;
22  double& m_duration;
23 
24  };
25 
26 }}}
Definition: enum_description.h:15
scoped_timer(double &duration)
Definition: timer.h:18
~scoped_timer()
Definition: timer.h:19