/usr/include/irstlm/timer.h is in libirstlm-dev 6.00.05-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 29 30 31 32 33 34 35 | #ifndef TIMER_H
#define TIMER_H
#include <ctime>
#include <iostream>
#include <iomanip>
#include "util.h"
class Timer
{
friend std::ostream& operator<<(std::ostream& os, Timer& t);
private:
bool running;
time_t start_time;
//TODO in seconds?
double elapsed_time();
public:
/***
* 'running' is initially false. A timer needs to be explicitly started
* using 'start' or 'restart'
*/
Timer() : running(false), start_time(0) { }
void start(const char* msg = 0);
// void restart(const char* msg = 0);
// void stop(const char* msg = 0);
void check(const char* msg = 0);
double get_elapsed_time();
};
#endif // TIMER_H
|