Substitute operation counting with a watchdog thread (477187, 2nd attempt, r=brendan/mrbkap/jst, sr=brendan/jst).

This commit is contained in:
Andreas Gal
2009-02-10 03:45:36 -08:00
parent 289e5bc286
commit 5af6756bd4
26 changed files with 601 additions and 641 deletions

View File

@@ -2478,3 +2478,21 @@ js_DateGetMsecSinceEpoch(JSContext *cx, JSObject *obj)
return 0;
return utctime;
}
#ifdef JS_THREADSAFE
#include "prinrval.h"
uint32
js_IntervalNow()
{
return uint32(PR_IntervalToMilliseconds(PR_IntervalNow()));
}
#else /* !JS_THREADSAFE */
uint32
js_IntervalNow()
{
return uint32(PRMJ_Now() / PRMJ_USEC_PER_MSEC);
}
#endif