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@6624 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
62bafae661
commit
ecb8723402
@ -32,6 +32,7 @@
|
||||
|
||||
#include "talk/base/base64.h"
|
||||
#include "talk/base/scoped_ptr.h"
|
||||
#include "talk/base/timing.h"
|
||||
#include "talk/session/media/channel.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -924,7 +925,7 @@ void StatsCollector::ExtractVideoInfo(
|
||||
}
|
||||
|
||||
double StatsCollector::GetTimeNow() {
|
||||
return timing_.WallTimeNow() * talk_base::kNumMillisecsPerSec;
|
||||
return talk_base::Timing::WallTimeNow() * talk_base::kNumMillisecsPerSec;
|
||||
}
|
||||
|
||||
bool StatsCollector::GetTransportIdFromProxy(const std::string& proxy,
|
||||
|
@ -40,8 +40,6 @@
|
||||
#include "talk/app/webrtc/statstypes.h"
|
||||
#include "talk/app/webrtc/webrtcsession.h"
|
||||
|
||||
#include "talk/base/timing.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class StatsCollector {
|
||||
@ -130,7 +128,6 @@ class StatsCollector {
|
||||
// Raw pointer to the session the statistics are gathered from.
|
||||
WebRtcSession* session_;
|
||||
double stats_gathering_started_;
|
||||
talk_base::Timing timing_;
|
||||
cricket::ProxyTransportMap proxy_to_transport_;
|
||||
|
||||
typedef std::vector<std::pair<AudioTrackInterface*, uint32> >
|
||||
|
@ -63,6 +63,7 @@ Timing::~Timing() {
|
||||
#endif
|
||||
}
|
||||
|
||||
// static
|
||||
double Timing::WallTimeNow() {
|
||||
#if defined(POSIX)
|
||||
struct timeval time;
|
||||
|
@ -41,7 +41,8 @@ class Timing {
|
||||
|
||||
// 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
|
||||
|
@ -46,6 +46,7 @@ Timing::~Timing() {
|
||||
#endif
|
||||
}
|
||||
|
||||
// static
|
||||
double Timing::WallTimeNow() {
|
||||
#if defined(WEBRTC_POSIX)
|
||||
struct timeval time;
|
||||
|
@ -24,7 +24,8 @@ class Timing {
|
||||
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user