Substitute operation counting with a watchdog thread (477187, 2nd attempt, r=brendan/mrbkap/jst, sr=brendan/jst).
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user