summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2023-04-29 00:06:33 +0300
committerAhmad Samir <a.samirh78@gmail.com>2023-05-15 17:21:22 +0300
commitc4ce22ef249ef710ec0ff624b44aa948efe9327a (patch)
tree956fd7b7187630742c7f6bdaf2a1ee06cd33bf8a
parent30b9c3a1358fa5a4aad89421c1e78e7eb8f9f4e0 (diff)
downloadqtbase-c4ce22ef249ef710ec0ff624b44aa948efe9327a.tar.gz
QEventDispatcher/WASM: fix a lambda name
It's returning milliseconds not nanoseconds. Change-Id: I7dbc3f4043694b6ddf87c6ad9e4d20d3a9af0fd1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
-rw-r--r--src/corelib/kernel/qeventdispatcher_wasm.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_wasm.cpp b/src/corelib/kernel/qeventdispatcher_wasm.cpp
index 8b64856621..6818a5eab8 100644
--- a/src/corelib/kernel/qeventdispatcher_wasm.cpp
+++ b/src/corelib/kernel/qeventdispatcher_wasm.cpp
@@ -507,13 +507,13 @@ void QEventDispatcherWasm::updateNativeTimer()
// access to m_timerInfo), and then call native API to set the new
// wakeup time on the main thread.
- auto timespecToNanosec = [](timespec ts) -> uint64_t {
+ auto timespecToMsec = [](timespec ts) -> uint64_t {
return ts.tv_sec * 1000 + ts.tv_nsec / (1000 * 1000);
};
timespec toWait;
bool hasTimer = m_timerInfo->timerWait(toWait);
- uint64_t currentTime = timespecToNanosec(m_timerInfo->currentTime);
- uint64_t toWaitDuration = timespecToNanosec(toWait);
+ uint64_t currentTime = timespecToMsec(m_timerInfo->currentTime);
+ uint64_t toWaitDuration = timespecToMsec(toWait);
uint64_t newTargetTime = currentTime + toWaitDuration;
auto maintainNativeTimer = [this, hasTimer, toWaitDuration, newTargetTime]() {