From b90f810ffa5a7f98b0ac58e5812bcdcd66d028bc Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 21 Jun 2016 14:36:55 -0700 Subject: Use QDateTime::currentMSecsSinceEpoch() instead of currentDateTime More efficient if all you want is the number of seconds. Change-Id: Ib57b52598e2f452985e9fffd145a36f2b3c703ea Reviewed-by: Erik Verbruggen --- src/quick/items/context2d/qquickcanvasitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index b3b5144eb3..89a68e4f33 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -711,7 +711,7 @@ void QQuickCanvasItem::updatePolish() for (auto it = animationCallbacks.cbegin(), end = animationCallbacks.cend(); it != end; ++it) { QV4::ScopedFunctionObject f(scope, it.value().value()); - callData->args[0] = QV4::Primitive::fromUInt32(QDateTime::currentDateTimeUtc().toTime_t()); + callData->args[0] = QV4::Primitive::fromUInt32(QDateTime::currentMSecsSinceEpoch() / 1000); f->call(callData); } } -- cgit v1.2.3