Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/main.cc5
-rw-r--r--src/server/timer.cc7
-rw-r--r--src/server/timer.h2
3 files changed, 11 insertions, 3 deletions
diff --git a/src/server/main.cc b/src/server/main.cc
index 3ce5197..6f71468 100644
--- a/src/server/main.cc
+++ b/src/server/main.cc
@@ -1,4 +1,5 @@
-/* server/main.cc
+/*
+ server/main.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
*/
@@ -21,7 +22,7 @@ int main( int argc, char *argv[] )
{
const float server_framerate = 1.0f / 20.0f;
std::cout << "The Osirion project " << OSIRION_VERSION << std::endl;
- Timer timer;
+ server::Timer timer;
// initialize game
game::init();
diff --git a/src/server/timer.cc b/src/server/timer.cc
index c8e6975..dc37cb3 100644
--- a/src/server/timer.cc
+++ b/src/server/timer.cc
@@ -1,4 +1,5 @@
-/* server/timer.cc
+/*
+ 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
*/
@@ -6,6 +7,8 @@
#include "timer.h"
#include <unistd.h>
+namespace server {
+
Timer::Timer()
{
gettimeofday(&this->timer_tick, &this->timer_tz);
@@ -35,3 +38,5 @@ void Timer::sleep(float seconds)
{
usleep((useconds_t) seconds*1000000.0f);
}
+
+}
diff --git a/src/server/timer.h b/src/server/timer.h
index 63957ee..f38806c 100644
--- a/src/server/timer.h
+++ b/src/server/timer.h
@@ -3,6 +3,7 @@
#include <sys/time.h>
+namespace server {
/// a timer measures that intervals in seconds
/*! A timer class measures the time elapsed
@@ -36,5 +37,6 @@ private:
struct timeval timer_tick;
}; // class Timer
+} // namespace server
#endif // __INCLUDED_TIMER_H__