Blame examples/ClockerPlugIn/Timer.h

Packit 8c9aa0
// //////////////////////////////////////////////////////////////////////////
Packit 8c9aa0
// Header file Timer.h for class Timer
Packit 8c9aa0
// (c)Copyright 2000, Baptiste Lepilleur.
Packit 8c9aa0
// Created: 2002/04/19
Packit 8c9aa0
// //////////////////////////////////////////////////////////////////////////
Packit 8c9aa0
#ifndef TIMER_H
Packit 8c9aa0
#define TIMER_H
Packit 8c9aa0
Packit 8c9aa0
#include <time.h>
Packit 8c9aa0
Packit 8c9aa0
/// A Timer.
Packit 8c9aa0
class Timer
Packit 8c9aa0
{
Packit 8c9aa0
public:
Packit 8c9aa0
  void start();
Packit 8c9aa0
  void finish();
Packit 8c9aa0
Packit 8c9aa0
  double elapsedTime() const;
Packit 8c9aa0
Packit 8c9aa0
private:
Packit 8c9aa0
  clock_t m_beginTime;
Packit 8c9aa0
  double m_elapsedTime;
Packit 8c9aa0
};
Packit 8c9aa0
Packit 8c9aa0
Packit 8c9aa0
Packit 8c9aa0
// Inlines methods for Timer:
Packit 8c9aa0
// --------------------------
Packit 8c9aa0
Packit 8c9aa0
Packit 8c9aa0
Packit 8c9aa0
#endif  // TIMER_H