Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
CycleTimer Class Reference

#include <timer.h>

Inheritance diagram for CycleTimer:
WallTimer

Public Member Functions

int64_t GetCycles () const
 
- Public Member Functions inherited from WallTimer
 WallTimer ()
 
void Reset ()
 
void Start ()
 When Start() is called multiple times, only the most recent is used.
 
void Restart ()
 
void Stop ()
 
double Get () const
 
int64_t GetInMs () const
 
int64_t GetInUsec () const
 
absl::Duration GetDuration () const
 
bool IsRunning () const
 

Additional Inherited Members

- Protected Member Functions inherited from WallTimer
int64_t GetNanos () const
 

Detailed Description

This is meant to be a ultra-fast interface to the hardware cycle counter, without periodic recalibration, to be even faster than absl::GetCurrentTimeNanos(). But this current implementation just uses GetCurrentTimeNanos().

Todo
(user): implement it.

Definition at line 74 of file timer.h.

Member Function Documentation

◆ GetCycles()

int64_t CycleTimer::GetCycles ( ) const
inline

This actually returns a number of nanoseconds instead of the number of CPU cycles.

Definition at line 78 of file timer.h.


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