diff options
| author | 2010-06-13 17:55:28 -0700 | |
|---|---|---|
| committer | 2010-06-13 17:55:28 -0700 | |
| commit | 7c8aa44f320f45e8417f0aba9ca67af6a67a5cf7 (patch) | |
| tree | 2d547d9d8ddc5b08310070121616294d92ebca70 /libs/utils/StopWatch.cpp | |
| parent | 94f14aeca9e6c6d07b39a7f708eacadcfeb6fbd2 (diff) | |
| parent | 46b9ac0ae2162309774a7478cd9d4e578747bfc2 (diff) | |
am 46b9ac0a: Native input dispatch rewrite work in progress.
Merge commit '46b9ac0ae2162309774a7478cd9d4e578747bfc2' into gingerbread
* commit '46b9ac0ae2162309774a7478cd9d4e578747bfc2':
Native input dispatch rewrite work in progress.
Diffstat (limited to 'libs/utils/StopWatch.cpp')
| -rw-r--r-- | libs/utils/StopWatch.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/utils/StopWatch.cpp b/libs/utils/StopWatch.cpp index 68a1c52177b9..b5dda2facca1 100644 --- a/libs/utils/StopWatch.cpp +++ b/libs/utils/StopWatch.cpp @@ -30,10 +30,9 @@ namespace android { StopWatch::StopWatch(const char *name, int clock, uint32_t flags) - : mName(name), mClock(clock), mFlags(flags), - mStartTime(0), mNumLaps(0) + : mName(name), mClock(clock), mFlags(flags) { - mStartTime = systemTime(mClock); + reset(); } StopWatch::~StopWatch() @@ -72,6 +71,12 @@ nsecs_t StopWatch::elapsedTime() const return systemTime(mClock) - mStartTime; } +void StopWatch::reset() +{ + mNumLaps = 0; + mStartTime = systemTime(mClock); +} + /*****************************************************************************/ |