File: MyTimer.h

package info (click to toggle)
bitseq 0.7.5%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,928 kB
  • sloc: cpp: 7,043; python: 562; makefile: 150; sh: 72
file content (28 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef MYTIMER_H
#define MYTIMER_H

#include<vector>

using namespace std;

class MyTimer{
 private:
   vector<time_t> times;
   long N;
   bool quiet;
   // Adjust time to format m or h.
   void adjust(double &time,char f);
   // Write time in format.
   void write(double time,char f);
 public:
   MyTimer();
   void setQuiet(){quiet=true;}
   void setVerbose(){quiet=false;}
   void start(long timer=0);
   double split(long timer=0, char f='s');
   double getTime(long timer=0, char f='s');
   double current(long timer=0, char f='s');
   double stop(long timer=0, char f='s');
};

#endif