How do I schedule a function one time in a future?
-
I need to schedule a function one time in a a certain future. I use this:
var timeout=setTimeout(function(){ function(); console.log("UNO"); }, 10000); clearTimeout(timeout);
But I read in the console the value "UNO" immediatly, and not after 10000 ms. Anyone can help me and suggest me how can I resolve this problem?
Copyright © 2024 NodeBB | Contributors