haiku/headers/os/support/StopWatch.h
Axel Dörfler 087882c26e * Rewrote headers as necessary; only Errors.h and Debug.h still originate from a Be header now;
feel free to change that ;-)
* Cleaned up existing headers.
* Coding style guide update to BBufferIO (renamed m_* members to f*).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-26 16:36:29 +00:00

39 lines
712 B
C++

/*
* Copyright 2001-2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _STOP_WATCH_H
#define _STOP_WATCH_H
#include <BeBuild.h>
#include <SupportDefs.h>
class BStopWatch {
public:
BStopWatch(const char* name, bool silent = false);
virtual ~BStopWatch();
void Suspend();
void Resume();
bigtime_t Lap();
bigtime_t ElapsedTime() const;
void Reset();
const char* Name() const;
private:
virtual void _ReservedStopWatch1();
virtual void _ReservedStopWatch2();
bigtime_t fStart;
bigtime_t fSuspendTime;
bigtime_t fLaps[10];
int32 fLap;
const char* fName;
uint32 _reserved[2];
bool fSilent;
};
#endif // _STOP_WATCH_H