0
setTimeout/setInterval을 사용하여 모바일 브라우저를 계산하는 방법의 CPU 효율은 어느 정도입니까?setTimeout/setInterval 모바일 브라우저가 CPU 효율을 계산합니다
function someFunction(){
console.timeEnd('someFunction timer');
//this function's code goes here...
console.time('someFunction timer');
}
이것은 당신에게 당신의 기능을 실행하는 데 걸린 시간을 줄 것이다 :
function fn() {
var start = new Date();
setInterval(function() {
var _s = new Date();
console.info(_s - start);
start = _s;
}, 1000/60)
}
fn()
'css3'과 어떤 관련이 있습니까? –
중복 가능 (또는 적어도 관련) : [스레드 잠자기와 관련하여 모바일 장치 웹 브라우저에 대한 표준이 있습니까?] (http://stackoverflow.com/questions/10739835/are-there-any-standards-for- 모바일 장치 웹 브라우저 - 용어 - 스레드 - 잠자기) – Bergi