Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
caffe2::Timer Class Reference

A simple timer object for measuring time. More...

#include <timer.h>

Public Types

typedef std::chrono::high_resolution_clock clock
 
typedef std::chrono::nanoseconds ns
 

Public Member Functions

void Start ()
 Starts a timer.
 
float NanoSeconds ()
 
float MilliSeconds ()
 Returns the elapsed time in milliseconds.
 
float MicroSeconds ()
 Returns the elapsed time in microseconds.
 
float Seconds ()
 Returns the elapsed time in seconds.
 

Protected Member Functions

 DISABLE_COPY_AND_ASSIGN (Timer)
 

Protected Attributes

std::chrono::time_point< clock > start_time_
 

Detailed Description

A simple timer object for measuring time.

This is a minimal class around a std::chrono::high_resolution_clock that serves as a utility class for testing code.

Definition at line 16 of file timer.h.


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