Bug 947862 - Initialize RealTimeClock on BSDs. r=jesup a=lsblakk
authorJan Beich <jbeich@tormail.org>
Mon, 09 Dec 2013 21:07:46 +0100
changeset 168763 f81e19286279a26bafc7ba611ff89e20b37ce694
parent 168762 0ae4bc68a5532b6a1fea3b61987e04353c6fd2f1
child 168764 4a9ff6555f3f1b7362d695c8ae1507c6161e6682
push id4732
push userrjesup@wgate.com
push dateSat, 14 Dec 2013 06:58:02 +0000
treeherdermozilla-aurora@f81e19286279 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, lsblakk
bugs947862
milestone28.0a2
Bug 947862 - Initialize RealTimeClock on BSDs. r=jesup a=lsblakk
media/webrtc/trunk/webrtc/system_wrappers/source/clock.cc
--- a/media/webrtc/trunk/webrtc/system_wrappers/source/clock.cc
+++ b/media/webrtc/trunk/webrtc/system_wrappers/source/clock.cc
@@ -10,17 +10,17 @@
 
 #include "webrtc/system_wrappers/interface/clock.h"
 
 #if defined(_WIN32)
 // Windows needs to be included before mmsystem.h
 #include <Windows.h>
 #include <WinSock.h>
 #include <MMSystem.h>
-#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_MAC))
+#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_BSD) || (defined WEBRTC_MAC))
 #include <sys/time.h>
 #include <time.h>
 #endif
 
 #include "webrtc/system_wrappers/interface/tick_util.h"
 
 namespace webrtc {
 
@@ -204,17 +204,17 @@ class WindowsRealTimeClock : public Real
     tv.tv_sec = (uint32_t)(Time / (uint64_t)10000000);
     tv.tv_usec = (uint32_t)((Time % (uint64_t)10000000) / 10);
     return tv;
   }
 
   WindowsHelpTimer* _helpTimer;
 };
 
-#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_MAC))
+#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_BSD) || (defined WEBRTC_MAC))
 class UnixRealTimeClock : public RealTimeClock {
  public:
   UnixRealTimeClock() {}
 
   virtual ~UnixRealTimeClock() {}
 
  protected:
   virtual timeval CurrentTimeVal() const OVERRIDE {
@@ -235,17 +235,17 @@ class UnixRealTimeClock : public RealTim
 // duration according to the Google Style guide.
 static WindowsHelpTimer global_help_timer = {0, 0, {{ 0, 0}, 0}, 0};
 #endif
 
 Clock* Clock::GetRealTimeClock() {
 #if defined(_WIN32)
   static WindowsRealTimeClock clock(&global_help_timer);
   return &clock;
-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
+#elif ((defined WEBRTC_LINUX) || (defined WEBRTC_BSD) || (defined WEBRTC_MAC))
   static UnixRealTimeClock clock;
   return &clock;
 #else
   return NULL;
 #endif
 }
 
 SimulatedClock::SimulatedClock(int64_t initial_time_us)