# \`delay\` nodes - suggestion/stuck

**URL:** <https://discourse.nodered.org/t/delay-nodes-suggestion-stuck/16596>\
**Category:** General\
**Created:** [11 October 2019 11:36 UTC](https://discourse.nodered.org/t/delay-nodes-suggestion-stuck/16596 "2019-10-11T11:36:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [11 October 2019 11:36 UTC](https://discourse.nodered.org/t/delay-nodes-suggestion-stuck/16596/1 "2019-10-11T11:36:19Z")

</div>

I have a flow and it has a `delay` node which is set to be variable.

Since "Daylight savings" has happened it has kind of done something weird.

I can't say for sure, because I messed about with it and it got a bit crazy for a while and may have missed a signal.

Anyway:  
It doesn't seem possible and I think it would be nice if you could open the `context data` option and click on the `delay` node and see what time it has left for the delay.

 ![Screenshot%20from%202019-10-11%2022-34-50](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/fc2104d77c951f9fd876a60af26d26fcfbb84f5c.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 October 2019 18:18 UTC](https://discourse.nodered.org/t/delay-nodes-suggestion-stuck/16596/2 "2019-10-11T18:18:04Z")

</div>

Hi - correct - it's not possible as the time remaining isn't held in context. It's just held in the javascript setTimeout object.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [11 October 2019 19:58 UTC](https://discourse.nodered.org/t/delay-nodes-suggestion-stuck/16596/3 "2019-10-11T19:58:35Z")

</div>

But here is a little function that updates a status every 200ms to give you an idea as to how far along the timer is

Its not foolproof but maybe useful to you

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/7b2eea218e378b94534488218f97f7b05f3dd0c0.png)

```auto
[{"id":"c76c2161.917d","type":"inject","z":"71db5e1b.7cbed","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":340,"wires":[["ae83771e.491038"]]},{"id":"ae83771e.491038","type":"change","z":"71db5e1b.7cbed","name":"","rules":[{"t":"set","p":"delay","pt":"msg","to":"3000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":340,"wires":[["8c55d222.76656"]]},{"id":"fa95d926.fae128","type":"delay","z":"71db5e1b.7cbed","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":640,"y":340,"wires":[["3192cecb.d702b2"]]},{"id":"3192cecb.d702b2","type":"debug","z":"71db5e1b.7cbed","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":810,"y":340,"wires":[]},{"id":"f3788271.0c67a","type":"change","z":"71db5e1b.7cbed","name":"","rules":[{"t":"set","p":"delay","pt":"msg","to":"4000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":380,"wires":[["8c55d222.76656"]]},{"id":"3096fbe5.c91524","type":"inject","z":"71db5e1b.7cbed","name":"","topic":"","payload":"2","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":380,"wires":[["f3788271.0c67a"]]},{"id":"8c55d222.76656","type":"function","z":"71db5e1b.7cbed","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"x":535,"y":340,"wires":[["fa95d926.fae128","4aeff8d7.a51188"]],"icon":"node-red/arrow-in.svg","l":false},{"id":"4aeff8d7.a51188","type":"function","z":"71db5e1b.7cbed","name":"","func":"var delay, starttime;\n\n/**\n * Describe this function...\n */\nfunction decTime() {\n delay = (typeof delay == 'number' ? delay : 0) + -200;\n node.status({fill:\"blue\", shape:\"ring\", text:delay});\n if (delay <= 0) {\n clearInterval(t);\n }\n}\n\n\ntry { clearInterval(t) } catch (e) { };\ndelay = (msg['delay']);\nstarttime = new Date().getTime();\nnode.status({fill:\"blue\", shape:\"ring\", text:delay});\nt=setInterval(decTime,200);","outputs":0,"noerr":0,"x":630,"y":280,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [11 October 2019 20:26 UTC](https://discourse.nodered.org/t/delay-nodes-suggestion-stuck/16596/4 "2019-10-11T20:26:44Z")

</div>

Thanks.

I guess that the value isn't context based, it is just how it is.
