Moses::Timer Class Reference

#include <Timer.h>

List of all members.

Public Member Functions

 Timer ()
void start (const char *msg=0)
void stop (const char *msg=0)
void check (const char *msg=0)
double get_elapsed_time () const


std::ostream & operator<< (std::ostream &os, Timer &t)

Detailed Description

Wrapper around time_t to time how long things have been running according to walltime. We avoid CPU time since it is less reliable in a multi-threaded environment and can spuriously include clock cycles used by other threads in the same process.

Definition at line 32 of file Timer.h.

Constructor & Destructor Documentation

Moses::Timer::Timer (  )  [inline]

Definition at line 47 of file Timer.h.

Member Function Documentation

void Timer::check ( const char *  msg = 0  ) 

Definition at line 91 of file Timer.cpp.

References get_elapsed_time(), and VERBOSE.

Referenced by PrintUserTime().

Here is the call graph for this function:

Here is the caller graph for this function:

double Timer::get_elapsed_time (  )  const

void Timer::start ( const char *  msg = 0  ) 

void Timer::stop ( const char *  msg = 0  ) 

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
Timer t 
) [friend]

Definition at line 105 of file Timer.cpp.

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

Generated on Thu Jul 6 00:33:36 2017 for Moses by  doxygen 1.5.9