gagan%netscape.com 2c6d5481f0 Merge from NuCache_BRANCH. Will not affect the build process.
git-svn-id: svn://10.0.0.236/trunk@8529 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:35:28 +00:00

25 lines
444 B
C++

/* A class to time excursion events */
/* declare an object of this class within the scope to be timed. */
#include "prtypes.h"
#include "prinrval.h"
class nsTimeIt
{
public:
nsTimeIt(PRUint32& tmp);
~nsTimeIt();
private:
PRIntervalTime t;
PRUint32& dest;
};
inline
nsTimeIt::nsTimeIt(PRUint32& tmp):t(PR_IntervalNow()), dest(tmp)
{
}
inline
nsTimeIt::~nsTimeIt()
{
dest = PR_IntervalToMicroseconds(PR_IntervalNow()-t);
}