diff options
author | Bernard Normier <bernard@zeroc.com> | 2016-08-02 20:05:01 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2016-08-02 20:05:01 -0400 |
commit | 6049c0327ba1c2de0c1065cd900a015723748e8b (patch) | |
tree | 827d29577b2ef057b9f567a765a9c5968246eb0d /cpp/src/IceUtil | |
parent | Update DispatchInterceptorAsyncCallback + small cleanups (diff) | |
download | ice-6049c0327ba1c2de0c1065cd900a015723748e8b.tar.bz2 ice-6049c0327ba1c2de0c1065cd900a015723748e8b.tar.xz ice-6049c0327ba1c2de0c1065cd900a015723748e8b.zip |
Moved StopWatch.h to IceUtil public include
Diffstat (limited to 'cpp/src/IceUtil')
-rw-r--r-- | cpp/src/IceUtil/StopWatch.h | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/cpp/src/IceUtil/StopWatch.h b/cpp/src/IceUtil/StopWatch.h deleted file mode 100644 index bd9d53c9d54..00000000000 --- a/cpp/src/IceUtil/StopWatch.h +++ /dev/null @@ -1,54 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#ifndef ICE_UTIL_STOPWATCH_H -#define ICE_UTIL_STOPWATCH_H - -#include <IceUtil/Time.h> - -namespace IceUtilInternal -{ - -class StopWatch -{ -public: - - StopWatch() { } - - void start() - { - _s = IceUtil::Time::now(IceUtil::Time::Monotonic); - } - - IceUtil::Int64 stop() - { - assert(isStarted()); - IceUtil::Int64 d = (IceUtil::Time::now(IceUtil::Time::Monotonic) - _s).toMicroSeconds(); - _s = IceUtil::Time(); - return d; - } - - bool isStarted() const - { - return _s != IceUtil::Time(); - } - - IceUtil::Int64 delay() - { - return (IceUtil::Time::now(IceUtil::Time::Monotonic) - _s).toMicroSeconds(); - } - -private: - - IceUtil::Time _s; -}; - -} // End namespace IceUtilInternal - -#endif |