Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-05-11 14:48:17 +0000
committerStijn Buys <ingar@osirion.org>2011-05-11 14:48:17 +0000
commit1c63cbf204b1d2c667ce9f821ccb197d0ffb0ac3 (patch)
treec2d0ff7cc4a8a264657abd0ac99017a5b664ecd2 /src/core/timer.h
parentbb0f860989f84b901f80017ae0139a3fc0446dc1 (diff)
Review of the main loop timer, converted timers from float to unsigned long,
corrected a number of timing bugs, improved client framerate stability.
Diffstat (limited to 'src/core/timer.h')
-rw-r--r--src/core/timer.h50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/core/timer.h b/src/core/timer.h
deleted file mode 100644
index 5157811..0000000
--- a/src/core/timer.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- core/timer.h
- This file is part of the Osirion project and is distributed under
- the terms and conditions of the GNU General Public License version 2
-*/
-
-#ifndef __INCLUDED_CORE_TIMER_H__
-#define __INCLUDED_CORE_TIMER_H__
-
-#include <sys/time.h>
-
-namespace core
-{
-
-/// a timer measures intervals in seconds
-/*! A timer class measures the time elapsed
-* between the last two calls to its mark() function.
-*/
-class Timer
-{
-public:
- /// Constructor
- Timer();
- /// Destructor
- ~Timer();
-
- /// mark the current time as zero
- /*! Reset the timer, all subsequent calls too elapsed() will
- * use the current timestamp as reference
- */
- void mark();
-
- /*! return the time elapsed since the last mark, in seconds
- * @see mark()
- */
- float elapsed();
-
- /// return timestamp since last mark, in microseconds
- unsigned long timestamp();
-
-private:
- float timer_elapsed;
- struct timezone timer_tz;
- struct timeval timer_tick;
-}; // class Timer
-
-} // namespace core
-
-#endif // __INCLUDED_CORE_TIMER_H__
-