TNT::Stopwatch class Reference
Main Page Namespace List Compound List File List Namespace Members Compound Members File Members
Copyright By PowCoder代写 加微信 powcoder
TNT::Stopwatch Class Reference
#include
List of all members.
Public Methods
Stopwatch ()
void start ()
double stop ()
double read ()
void resume ()
int running ()
Detailed Description
Performance Stopwatch used for benchmarking codes. Measures seconds elapsed as a floating point number. Resolution of the clock is determined by CLOCKS_PER_SEC in time.h. Typical use is given by
Stopwatch Q;
{code to benchmark}
double time_elapsed = Q.read();
Constructor & Destructor Documentation
TNT::Stopwatch::Stopwatch (
Create an instance of a Stopwatch, with its own internal counter.
Member Function Documentation
double TNT::Stopwatch::read (
) [inline]
Read current time, in seconds. (NOTE: Does NOT stop timing.)
void TNT::Stopwatch::resume (
) [inline]
Resume timing, if currently stopped. Operation has no effect if Stopwatch is already running.
int TNT::Stopwatch::running (
) [inline]
Zero (0) if stopwatch is not currently running, i.e. stopped. One (1), otherwise.
void TNT::Stopwatch::start (
) [inline]
Start timing from 0.00.
double TNT::Stopwatch::stop (
) [inline]
Stop timing and return elapsed time (in seconds).
The documentation for this class was generated from the following file: tnt_stopwatch.h
Generated at Thu Jun 26 17:26:25 2003 for Template Numerical Toolkit (TNT) by
1.2.5 written by Dimitri van Heesch,
© 1997-2001
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com