Commit b3a0cf57 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Replace more uses of msclock() with xp_timer[64]()

parent 7dc07918
Pipeline #2728 passed with stage
in 9 minutes and 26 seconds
......@@ -790,7 +790,7 @@ js_mswait(JSContext *cx, uintN argc, jsval *arglist)
{
jsval *argv=JS_ARGV(cx, arglist);
int32 val=1;
clock_t start=msclock();
double start=xp_timer();
jsrefcount rc;
if(argc) {
......@@ -801,7 +801,7 @@ js_mswait(JSContext *cx, uintN argc, jsval *arglist)
mswait(val);
JS_RESUMEREQUEST(cx, rc);
JS_SET_RVAL(cx, arglist,UINT_TO_JSVAL(msclock()-start));
JS_SET_RVAL(cx, arglist,DOUBLE_TO_JSVAL((xp_timer()-start) * 1000));
return(JS_TRUE);
}
......
......@@ -94,7 +94,7 @@ enum {
,SYS_PROP_MODS_DIR
,SYS_PROP_LOGS_DIR
/* msclock() access */
/* clock/timer access */
,SYS_PROP_CLOCK
,SYS_PROP_CLOCK_PER_SEC
,SYS_PROP_TIMER
......@@ -312,10 +312,10 @@ static JSBool js_system_get(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
break;
case SYS_PROP_CLOCK:
*vp=DOUBLE_TO_JSVAL((double)msclock());
*vp=DOUBLE_TO_JSVAL((double)xp_timer64());
break;
case SYS_PROP_CLOCK_PER_SEC:
*vp=UINT_TO_JSVAL(MSCLOCKS_PER_SEC);
*vp=UINT_TO_JSVAL(1000);
break;
case SYS_PROP_TIMER:
*vp=DOUBLE_TO_JSVAL(xp_timer());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment