From 0bd7078c42aa7c24c3e15b81a718640a47bf9012 Mon Sep 17 00:00:00 2001
From: Mathias Froehlich <Mathias.Froehlich@web.de>
Date: Fri, 28 Oct 2011 17:01:50 +0200
Subject: [PATCH] Make use of SGTimeStamp for sleep*

---
 src/Main/main.cxx       | 4 ++--
 src/Main/metar_main.cxx | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/Main/main.cxx b/src/Main/main.cxx
index 75b0c4481..aed183c37 100644
--- a/src/Main/main.cxx
+++ b/src/Main/main.cxx
@@ -47,11 +47,11 @@
 #include <simgear/props/AtomicChangeListener.hxx>
 #include <simgear/props/props.hxx>
 #include <simgear/timing/sg_time.hxx>
+#include <simgear/timing/timestamp.hxx>
 #include <simgear/magvar/magvar.hxx>
 #include <simgear/math/sg_random.h>
 #include <simgear/io/raw_socket.hxx>
 #include <simgear/scene/tsync/terrasync.hxx>
-#include <simgear/misc/sg_sleep.hxx>
 
 #include <Time/light.hxx>
 #include <Aircraft/replay.hxx>
@@ -214,7 +214,7 @@ static void fgMainLoop( void ) {
         {
             fgSplashProgress("loading scenery");
             // be nice to loader threads while waiting for initial scenery, reduce to 2fps
-            simgear::sleepForMSec(500);
+            SGTimeStamp::sleepForMSec(500);
         }
     }
 
diff --git a/src/Main/metar_main.cxx b/src/Main/metar_main.cxx
index bf7430d12..7b904d3a2 100644
--- a/src/Main/metar_main.cxx
+++ b/src/Main/metar_main.cxx
@@ -34,7 +34,6 @@
 #include <simgear/io/HTTPClient.hxx>
 #include <simgear/io/HTTPRequest.hxx>
 #include <simgear/timing/timestamp.hxx>
-#include <simgear/misc/sg_sleep.hxx>
 
 using namespace std;
 using namespace simgear;
@@ -586,7 +585,7 @@ int main(int argc, char *argv[])
                     if (mr->complete || mr->failed) {
                         break;
                     }
-                    sleepForMSec(1);
+                    SGTimeStamp::sleepForMSec(1);
                 }
                 
                 if (!mr->complete) {