Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

birdietorerik's avatar

setTimeout function reverted

Hi!

Using setTimeout like this:

setTimeout(function () {
                _this.getLocation();
                _this.storeposition();
                _this.demoeasyflow(_this.oldnum);
                _this.oldnum++;
            }, 30000); //delay is in milliseconds

```

My issue is that my functions dosent start before after 30 seconds.
First time i want setTimeout to start right away. 
How do i do that  ?
0 likes
2 replies

Please or to participate in this conversation.