Change Timing::WallTimeNow to be static.
There's no need to construct a Timing object to call this method.
On Windows we were unnecessarily calling CreateWaitableTimer + CloseHandle but never actually using that waitable timer.
There's otherwise no change in functionality.
R=xians@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/20869004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6624 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/base/timing.cc b/base/timing.cc
index aa1fc42..0c5ed5e 100644
--- a/base/timing.cc
+++ b/base/timing.cc
@@ -46,6 +46,7 @@
#endif
}
+// static
double Timing::WallTimeNow() {
#if defined(WEBRTC_POSIX)
struct timeval time;
diff --git a/base/timing.h b/base/timing.h
index 58b17a9..1dee607 100644
--- a/base/timing.h
+++ b/base/timing.h
@@ -24,7 +24,8 @@
// WallTimeNow() returns the current wall-clock time in seconds,
// within 10 milliseconds resolution.
- virtual double WallTimeNow();
+ // WallTimeNow is static and does not require a timer_handle_ on Windows.
+ static double WallTimeNow();
// TimerNow() is like WallTimeNow(), but is monotonically
// increasing. It returns seconds in resolution of 10 microseconds