문제

I'm looking to build a program that works within soft real-time schedules; to do this, I need to generate a timing event at an interval significantly less than a second.

Is there an API that exposes fine-grain timers in WebOS?

도움이 되었습니까?

해결책

You can use the DOM API setTimeout() to have a function be called back in the future. The timing is specified in milliseconds. Your callback will be called at least that many milliseconds after the call to setTimeout, but it could be longer if other JS code is running, since the Javascript engine won't interrupt running code to call your function.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top