Records lap times.  
 More...
#include <Stopwatch.h>
Records lap times. 
- Author
 - Michael Imamura 
 
 
      
        
          | HoverRace::Util::Stopwatch::Stopwatch  | 
          ( | 
          std::shared_ptr< Clock >  | 
          clock | ) | 
           | 
        
      
 
Constructor. 
The start time of the first lap is recorded as the current time of the clock. 
- Parameters
 - 
  
    | clock | The clock to use for timing.  | 
  
   
 
 
      
        
          | HoverRace::Util::Stopwatch::Stopwatch  | 
          ( | 
          std::shared_ptr< Clock >  | 
          clock,  | 
        
        
           | 
           | 
          const Duration &  | 
          start  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Constructor. 
- Parameters
 - 
  
    | clock | The clock to use for timing.  | 
    | start | The timestamp of the start of the first lap.  | 
  
   
 
 
template<typename Fn > 
  
  
      
        
          | void HoverRace::Util::Stopwatch::ForEachLap  | 
          ( | 
          Fn  | 
          fn | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
      
        
          | Duration HoverRace::Util::Stopwatch::NextLap  | 
          ( | 
          const std::string &  | 
          name | ) | 
           | 
        
      
 
Start a new lap. 
- Parameters
 - 
  
    | name | The name of the lap that just ended.  | 
  
   
- Returns
 - The elapsed time for the lap that just ended. 
 
 
 
  
  
      
        
          | std::shared_ptr<Clock> HoverRace::Util::Stopwatch::clock | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | std::vector<Lap> HoverRace::Util::Stopwatch::laps | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | Duration HoverRace::Util::Stopwatch::lastLap | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following files: