Source-highlight Library
stopwatch.h
1
//
2
// C++ Interface: stopwatch
3
//
4
// Description:
5
//
6
//
7
// Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2006
8
//
9
// Copyright: See COPYING file that comes with this distribution
10
//
11
//
12
#ifndef STOPWATCH_H
13
#define STOPWATCH_H
14
15
#include <time.h>
16
17
namespace
srchilite
{
18
22
class
StopWatch
{
23
clock_t start;
24
public
:
29
StopWatch
() : start(clock()) {}
30
35
~StopWatch
();
36
37
};
38
39
}
40
41
#endif
srchilite::StopWatch::~StopWatch
~StopWatch()
Upon destruction, prints the elapsed time in seconds, since the construction of this StopWatch.
Definition:
stopwatch.cpp:25
srchilite
C++ class: doctemplate.h.
Definition:
bufferedoutput.cpp:13
srchilite::StopWatch::StopWatch
StopWatch()
constructs a StopWatch object by storing the current time (uses clock())
Definition:
stopwatch.h:29
srchilite::StopWatch
Records elapsed time.
Definition:
stopwatch.h:22
stopwatch.h
Generated by
1.8.17