mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
993 B
44 lines
993 B
/******************************Module*Header*******************************\
|
|
* Module Name: util.hxx
|
|
*
|
|
* Utility classes
|
|
*
|
|
* Copyright (c) 1996 Microsoft Corporation
|
|
*
|
|
\**************************************************************************/
|
|
|
|
#ifndef __util_hxx__
|
|
#define __util_hxx__
|
|
|
|
#if 0
|
|
class SS_TIME {
|
|
public:
|
|
SS_TIME() { Zero(); };
|
|
double Seconds();
|
|
void Update();
|
|
void Zero();
|
|
SS_TIME operator+( SS_TIME addTime );
|
|
SS_TIME operator-( SS_TIME subTime );
|
|
SS_TIME operator+=( SS_TIME addTime );
|
|
SS_TIME operator-=( SS_TIME subTime );
|
|
operator double() { return seconds; };
|
|
operator float() { return (float) seconds; };
|
|
operator int() { return (int) (seconds + 0.5); };
|
|
private:
|
|
double seconds;
|
|
};
|
|
|
|
class SS_TIMER {
|
|
public:
|
|
SS_TIMER() { Reset(); };
|
|
void Start();
|
|
SS_TIME Stop();
|
|
void Reset();
|
|
SS_TIME ElapsedTime();
|
|
private:
|
|
SS_TIME startTime;
|
|
SS_TIME elapsed;
|
|
};
|
|
#endif
|
|
|
|
#endif // __util_hxx__
|