aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp4
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp2
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp2
-rw-r--r--xbmc/cores/VideoPlayer/DVDMessage.cpp2
-rw-r--r--xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp4
-rw-r--r--xbmc/filesystem/CacheStrategy.cpp2
-rw-r--r--xbmc/filesystem/CurlFile.cpp2
-rw-r--r--xbmc/interfaces/legacy/ModuleXbmc.cpp2
-rw-r--r--xbmc/interfaces/legacy/Monitor.cpp2
-rw-r--r--xbmc/interfaces/python/PythonInvoker.cpp2
-rw-r--r--xbmc/network/WakeOnAccess.cpp2
-rw-r--r--xbmc/threads/SystemClock.h2
-rw-r--r--xbmc/threads/test/TestEndTime.cpp4
13 files changed, 16 insertions, 16 deletions
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
index 1d551d62a9..20c6987f53 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
@@ -975,7 +975,7 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg)
}
}
else
- m_extTimeout = m_extDrainTimer.MillisLeft();
+ m_extTimeout = m_extDrainTimer.GetTimeLeft();
}
else
m_extTimeout = 5000ms;
@@ -1109,7 +1109,7 @@ void CActiveAE::Process()
// wait for message
else if (m_outMsgEvent.Wait(m_extTimeout))
{
- m_extTimeout = timer.MillisLeft();
+ m_extTimeout = timer.GetTimeLeft();
continue;
}
// time out
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
index 7c3ccc6b5c..aea2c054be 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
@@ -662,7 +662,7 @@ void CActiveAESink::Process()
// wait for message
else if (m_outMsgEvent.Wait(m_extTimeout))
{
- m_extTimeout = timer.MillisLeft();
+ m_extTimeout = timer.GetTimeLeft();
continue;
}
// time out
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
index 1ba38f1312..dbc5bd614e 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
@@ -452,7 +452,7 @@ void CActiveAEStream::Drain(bool wait)
else if (!wait)
return;
- m_inMsgEvent.Wait(timer.MillisLeft());
+ m_inMsgEvent.Wait(timer.GetTimeLeft());
}
CLog::Log(LOGERROR, "CActiveAEStream::Drain - timeout out");
}
diff --git a/xbmc/cores/VideoPlayer/DVDMessage.cpp b/xbmc/cores/VideoPlayer/DVDMessage.cpp
index 073a60d20d..4d81599de0 100644
--- a/xbmc/cores/VideoPlayer/DVDMessage.cpp
+++ b/xbmc/cores/VideoPlayer/DVDMessage.cpp
@@ -60,7 +60,7 @@ bool CDVDMsgGeneralSynchronize::Wait(unsigned int milliseconds, unsigned int sou
while (m_p->reached != m_p->sources)
{
- milliseconds = std::min(m_p->timeout.MillisLeft().count(), timeout.MillisLeft().count());
+ milliseconds = std::min(m_p->timeout.GetTimeLeft().count(), timeout.GetTimeLeft().count());
if (m_p->condition.wait(lock, std::chrono::milliseconds(milliseconds)))
continue;
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
index c55b7d7921..7355b6a51f 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
@@ -123,7 +123,7 @@ bool CRenderManager::Configure(const VideoPicture& picture, float fps, unsigned
m_forceNext = false;
return false;
}
- m_presentevent.wait(lock, endtime.MillisLeft());
+ m_presentevent.wait(lock, endtime.GetTimeLeft());
}
m_forceNext = false;
}
@@ -265,7 +265,7 @@ void CRenderManager::FrameWait(int ms)
XbmcThreads::EndTime<> timeout{std::chrono::milliseconds(ms)};
CSingleLock lock(m_presentlock);
while(m_presentstep == PRESENT_IDLE && !timeout.IsTimePast())
- m_presentevent.wait(lock, timeout.MillisLeft());
+ m_presentevent.wait(lock, timeout.GetTimeLeft());
}
bool CRenderManager::IsPresenting()
diff --git a/xbmc/filesystem/CacheStrategy.cpp b/xbmc/filesystem/CacheStrategy.cpp
index 7df47e059a..dcb8e23f36 100644
--- a/xbmc/filesystem/CacheStrategy.cpp
+++ b/xbmc/filesystem/CacheStrategy.cpp
@@ -192,7 +192,7 @@ int64_t CSimpleFileCache::WaitForData(uint32_t iMinAvail, uint32_t iMillis)
if (iAvail >= iMinAvail)
return iAvail;
- if (!m_hDataAvailEvent->Wait(endTime.MillisLeft()))
+ if (!m_hDataAvailEvent->Wait(endTime.GetTimeLeft()))
return CACHE_RC_TIMEOUT;
}
return GetAvailableRead();
diff --git a/xbmc/filesystem/CurlFile.cpp b/xbmc/filesystem/CurlFile.cpp
index 111225a1be..39e3d2b86c 100644
--- a/xbmc/filesystem/CurlFile.cpp
+++ b/xbmc/filesystem/CurlFile.cpp
@@ -1858,7 +1858,7 @@ int8_t CCurlFile::CReadState::FillBuffer(unsigned int want)
}
else
{
- unsigned int time_left = endTime.MillisLeft().count();
+ unsigned int time_left = endTime.GetTimeLeft().count();
struct timeval wait = { (int)time_left / 1000, ((int)time_left % 1000) * 1000 };
rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &wait);
}
diff --git a/xbmc/interfaces/legacy/ModuleXbmc.cpp b/xbmc/interfaces/legacy/ModuleXbmc.cpp
index 62e2d25f0e..37e377b4e6 100644
--- a/xbmc/interfaces/legacy/ModuleXbmc.cpp
+++ b/xbmc/interfaces/legacy/ModuleXbmc.cpp
@@ -143,7 +143,7 @@ namespace XBMCAddon
{
DelayedCallGuard dcguard;
lh = dcguard.getLanguageHook(); // borrow this
- long nextSleep = endTime.MillisLeft().count();
+ long nextSleep = endTime.GetTimeLeft().count();
if (nextSleep > 100)
nextSleep = 100; // only sleep for 100 millis
KODI::TIME::Sleep(nextSleep);
diff --git a/xbmc/interfaces/legacy/Monitor.cpp b/xbmc/interfaces/legacy/Monitor.cpp
index 170fc8abe2..34d0553500 100644
--- a/xbmc/interfaces/legacy/Monitor.cpp
+++ b/xbmc/interfaces/legacy/Monitor.cpp
@@ -49,7 +49,7 @@ namespace XBMCAddon
{
{
DelayedCallGuard dg(languageHook);
- auto timeout = std::min(endTime.MillisLeft(), 100ms);
+ auto timeout = std::min(endTime.GetTimeLeft(), 100ms);
if (abortEvent.Wait(timeout))
return true;
}
diff --git a/xbmc/interfaces/python/PythonInvoker.cpp b/xbmc/interfaces/python/PythonInvoker.cpp
index b7d3cdd75e..93b26c0154 100644
--- a/xbmc/interfaces/python/PythonInvoker.cpp
+++ b/xbmc/interfaces/python/PythonInvoker.cpp
@@ -523,7 +523,7 @@ bool CPythonInvoker::stop(bool abort)
// Useful for add-on performance metrics
if (!timeout.IsTimePast())
CLog::Log(LOGDEBUG, "CPythonInvoker({}, {}): script termination took {}ms", GetId(),
- m_sourceFile, (PYTHON_SCRIPT_TIMEOUT - timeout.MillisLeft()).count());
+ m_sourceFile, (PYTHON_SCRIPT_TIMEOUT - timeout.GetTimeLeft()).count());
// Since we released the m_critical it's possible that the state is cleaned up
// so we need to recheck for m_threadState == NULL
diff --git a/xbmc/network/WakeOnAccess.cpp b/xbmc/network/WakeOnAccess.cpp
index 796b8404cc..043fc956bf 100644
--- a/xbmc/network/WakeOnAccess.cpp
+++ b/xbmc/network/WakeOnAccess.cpp
@@ -321,7 +321,7 @@ public:
m_dialog->Progress();
- auto ms_passed = timeOutMs - end_time.MillisLeft();
+ auto ms_passed = timeOutMs - end_time.GetTimeLeft();
int percentage = (ms_passed.count() * 100) / timeOutMs.count();
m_dialog->SetPercentage(std::max(percentage, 1)); // avoid flickering , keep minimum 1%
diff --git a/xbmc/threads/SystemClock.h b/xbmc/threads/SystemClock.h
index a6d1b476a8..e81cd05689 100644
--- a/xbmc/threads/SystemClock.h
+++ b/xbmc/threads/SystemClock.h
@@ -74,7 +74,7 @@ public:
return ((now - m_startTime) >= m_totalWaitTime);
}
- T MillisLeft() const
+ T GetTimeLeft() const
{
if (m_totalWaitTime == m_infinity)
return m_infinity;
diff --git a/xbmc/threads/test/TestEndTime.cpp b/xbmc/threads/test/TestEndTime.cpp
index 61fc0146ef..1b52e5db0a 100644
--- a/xbmc/threads/test/TestEndTime.cpp
+++ b/xbmc/threads/test/TestEndTime.cpp
@@ -21,12 +21,12 @@ void CommonTests(XbmcThreads::EndTime<>& endTime)
EXPECT_LT(0ms, endTime.GetStartTime());
EXPECT_FALSE(endTime.IsTimePast());
- EXPECT_LT(0ms, endTime.MillisLeft());
+ EXPECT_LT(0ms, endTime.GetTimeLeft());
std::this_thread::sleep_for(100ms);
EXPECT_TRUE(endTime.IsTimePast());
- EXPECT_EQ(0ms, endTime.MillisLeft());
+ EXPECT_EQ(0ms, endTime.GetTimeLeft());
endTime.SetInfinite();
EXPECT_EQ(std::chrono::milliseconds::max(), endTime.GetInitialTimeoutValue());