TRIGGERTIME returning 0

Hi there– Stumped as I occasionally find myself :slight_smile:

I'm trying to use TRIGGERTIME to stop a While loop, in the form of the calculation While NOW-TRIGGERTIME < timeLimit (a variable holding a number of seconds.) While trying to debug this, I have found in Variable Inspector that TRIGGERTIME is returning 0, even while watching it during the macro.

To check for user error I found that both NOW and TIME returned their expected values.

If anyone can point me in a direction as to why this might be, please let me know!
Thank you.

I'm fairly sure TRIGGERTIME() is unique to each macro instance, which would explain why it shows up as 0 in the inspector. You could always set it to a global variable if you want to double check its value. In the meantime, that calculation of NOW() - TRIGGERTIME() < Variable seems to work fine for me regardless of what the inspector shows, so I can't say what could be going wrong in your macro without seeing the macro itself.

2 Likes