Is there a more accurate way to create a Javascript timer than setTimeout?

后端 未结 16 2172
礼貌的吻别
礼貌的吻别 2020-11-22 14:11

Something that has always bugged me is how unpredictable the setTimeout() method in Javascript is.

In my experience, the timer is horribly inaccurate in

16条回答
  •  旧时难觅i
    2020-11-22 14:48

    Hate to say it, but I don't think there is a way to alleviate this. I do think that it depends on the client system, though, so a faster javascript engine or machine may make it slightly more accurate.

提交回复
热议问题