From 07b6b25c4c123640c6ed65ce5d68cec46c6281c1 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Sat, 14 Mar 2020 02:34:11 +0100 Subject: [PATCH] Improve the documentation for QElapsedTimer::restart, include units Specify that QElapsedTimer::restart returns milliseconds Change-Id: I47d9ffde7b0f73c30b14d2ce8467ec0a553b58f8 Reviewed-by: Paul Wicking (cherry picked from commit 302254f90f41509b3d1111551296134cd76a3db5) Reviewed-by: Giuseppe D'Angelo Reviewed-by: Volker Hilsheimer --- src/corelib/kernel/qelapsedtimer_generic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/kernel/qelapsedtimer_generic.cpp b/src/corelib/kernel/qelapsedtimer_generic.cpp index 4201e37c0b6..2f7b50ed841 100644 --- a/src/corelib/kernel/qelapsedtimer_generic.cpp +++ b/src/corelib/kernel/qelapsedtimer_generic.cpp @@ -81,7 +81,8 @@ void QElapsedTimer::start() noexcept } /*! - Restarts the timer and returns the time elapsed since the previous start. + Restarts the timer and returns the number of milliseconds elapsed since + the previous start. This function is equivalent to obtaining the elapsed time with elapsed() and then starting the timer again with start(), but it does so in one single operation, avoiding the need to obtain the clock value twice.