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>2008-08-15 16:07:58 +0000
committerStijn Buys <ingar@osirion.org>2008-08-15 16:07:58 +0000
commitfa589fafa7f094bc1bf07642b55f3d824814adba (patch)
treedc1b96685c4d92cd838551ee14ce02a7f81eb5bf /src/server/timer.cc
parentb780874cf4ab23cf9e48aa23da2394169da24887 (diff)
moved Timer to core::
Diffstat (limited to 'src/server/timer.cc')
-rw-r--r--src/server/timer.cc41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/server/timer.cc b/src/server/timer.cc
deleted file mode 100644
index 56075c7..0000000
--- a/src/server/timer.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- server/timer.cc
- This file is part of the Osirion project and is distributed under
- the terms and conditions of the GNU General Public License version 2
-*/
-
-#include "timer.h"
-
-#include <unistd.h>
-#include <iostream>
-
-namespace server {
-
-Timer::Timer()
-{
- gettimeofday(&this->timer_tick, &this->timer_tz);
- this->timer_elapsed = 0;
-}
-
-Timer::~Timer()
-{
-}
-
-void Timer::mark()
-{
- gettimeofday(&timer_tick, &timer_tz);
-}
-
-float Timer::elapsed()
-{
- struct timeval tick;
- struct timezone tick_tz;
-
- gettimeofday(&tick, &tick_tz);
-
- // calculate elapsed time in 10^-6 seconds
- long delta = (tick.tv_sec - timer_tick.tv_sec) * 1000000 + (tick.tv_usec - timer_tick.tv_usec);
- return( (float) delta / 1000000.0f);
-}
-
-}