X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fstlplus%2Fsubsystems%2Ftimer.hpp;fp=src%2Fstlplus%2Fsubsystems%2Ftimer.hpp;h=0000000000000000000000000000000000000000;hb=5846afb00833cc72fe72422ca896d2387c712cb4;hp=a3ad38d62d4d789bffd63ba51dfb08ad4e111e02;hpb=a97500609dc3c1b11f9786d32bc458eb00de4c36;p=chaz%2Fyoink diff --git a/src/stlplus/subsystems/timer.hpp b/src/stlplus/subsystems/timer.hpp deleted file mode 100644 index a3ad38d..0000000 --- a/src/stlplus/subsystems/timer.hpp +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef STLPLUS_TIMER -#define STLPLUS_TIMER -//////////////////////////////////////////////////////////////////////////////// - -// Author: Andy Rushton -// Copyright: (c) Southampton University 1999-2004 -// (c) Andy Rushton 2004-2009 -// License: BSD License, see ../docs/license.html - -// A CPU timer encapsulated as a class. Measures the CPU time used since its -// construction and allows this cumulative time to be reported at any time. - -//////////////////////////////////////////////////////////////////////////////// -#include "subsystems_fixes.hpp" -#include -#include -#include - -namespace stlplus -{ - - //////////////////////////////////////////////////////////////////////////////// - - class timer - { - private: - clock_t m_clock; - time_t m_time; - - public: - // constructor resets the timer to zero - timer(void); - ~timer(void); - - // reset the timer to zero without destroying it - void reset(void); - - // get the elapsed time in seconds, expressed as a float - float elapsed(void) const; - // get the CPU time in seconds, expressed as a float - float cpu(void) const; - - // get a printable string representing the elapsed time and CPU time - std::string text(void) const; - }; - - //////////////////////////////////////////////////////////////////////////////// - - // print the elapsed time and CPU time using the same representation as the text method - std::ostream& operator << (std::ostream&, const timer&); - - //////////////////////////////////////////////////////////////////////////////// - -} // end namespace stlplus - -#endif