gagan%netscape.com b19f886c20 Test checkin to verify merge. Not in build process.
git-svn-id: svn://10.0.0.236/trunk@8508 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:31:05 +00:00

27 lines
469 B
C++

/* TODO put NPL here */
/* 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);
}