bug 1108787 use NowLoRes() for progress event timing r=cpearce
authorKarl Tomlinson <karlt+@karlt.net>
Fri, 21 Nov 2014 15:45:29 +1300
changeset 218931 e72d2f6bfa3a76c6a9188b7bee41b388e6062e94
parent 218930 6ff5dad95494dfcccdf2d7c6290f880a7d480db6
child 218932 1d18303ed2f7b5eefd8b2a2eafc63619113d1fbc
push id52684
push userktomlinson@mozilla.com
push dateWed, 10 Dec 2014 00:03:25 +0000
treeherdermozilla-inbound@66c75c0a2312 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1108787
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1108787 use NowLoRes() for progress event timing r=cpearce Precision is not required, and is more costly on some platforms.
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1551,17 +1551,17 @@ static void ProgressCallback(nsITimer* a
 }
 
 void MediaDecoder::Progress(bool aTimer)
 {
   MOZ_ASSERT(NS_IsMainThread());
   if (!mOwner)
     return;
 
-  TimeStamp now = TimeStamp::Now();
+  TimeStamp now = TimeStamp::NowLoRes();
 
   if (!aTimer) {
     mDataTime = now;
   }
 
   // If this is the first progress, or PROGRESS_MS has passed since the last
   // progress event fired and more data has arrived since then, fire a
   // progress event.