]>
Dogcows Code - chaz/yoink/blob - src/stlplus/subsystems/timer.hpp
3 ////////////////////////////////////////////////////////////////////////////////
5 // Author: Andy Rushton
6 // Copyright: (c) Southampton University 1999-2004
7 // (c) Andy Rushton 2004-2009
8 // License: BSD License, see ../docs/license.html
10 // A CPU timer encapsulated as a class. Measures the CPU time used since its
11 // construction and allows this cumulative time to be reported at any time.
13 ////////////////////////////////////////////////////////////////////////////////
14 #include "subsystems_fixes.hpp"
22 ////////////////////////////////////////////////////////////////////////////////
31 // constructor resets the timer to zero
35 // reset the timer to zero without destroying it
38 // get the elapsed time in seconds, expressed as a float
39 float elapsed(void) const;
40 // get the CPU time in seconds, expressed as a float
41 float cpu(void) const;
43 // get a printable string representing the elapsed time and CPU time
44 std::string
text(void) const;
47 ////////////////////////////////////////////////////////////////////////////////
49 // print the elapsed time and CPU time using the same representation as the text method
50 std::ostream
& operator << (std::ostream
&, const timer
&);
52 ////////////////////////////////////////////////////////////////////////////////
54 } // end namespace stlplus
This page took 0.033466 seconds and 4 git commands to generate.