[Pkg-owncloud-commits] [owncloud-client] 51/175: StopWatch: return the duration from the stop() command.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Aug 8 10:36:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 2fcad760b9c20ef626f4c1564cf3ffed59951c2d
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Thu Dec 4 17:57:29 2014 +0100

    StopWatch: return the duration from the stop() command.
---
 src/libsync/utility.cpp | 4 +++-
 src/libsync/utility.h   | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/libsync/utility.cpp b/src/libsync/utility.cpp
index ce9aa2e..1fb1c3e 100644
--- a/src/libsync/utility.cpp
+++ b/src/libsync/utility.cpp
@@ -401,10 +401,12 @@ void Utility::StopWatch::start()
     _timer.start();
 }
 
-void Utility::StopWatch::stop()
+quint64 Utility::StopWatch::stop()
 {
     addLapTime(QLatin1String(STOPWATCH_END_TAG));
+    quint64 duration = _timer.elapsed();
     _timer.invalidate();
+    return duration;
 }
 
 void Utility::StopWatch::reset()
diff --git a/src/libsync/utility.h b/src/libsync/utility.h
index a9e8bb7..56c241d 100644
--- a/src/libsync/utility.h
+++ b/src/libsync/utility.h
@@ -105,7 +105,7 @@ namespace Utility
         QElapsedTimer _timer;
     public:
         void start();
-        void stop();
+        quint64 stop();
         quint64 addLapTime( const QString& lapName );
         void reset();
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list