I have a login macro that I want to wait until the system uptime is over a threshold of # of seconds. This is to give the system time to "calm down" before I start executing any other actions. My corporate laptop runs a million security scans on boot, so it's futile to try and do anything else while the CPU is pegged with system scans.
I searched and found the "UPTIME()" function with will return the time since the system booted. I want to put that into a "pause until" or similar to tell the system to wait until UPTIME() is => the threshold that I set for it.
I'm not married to "pause until", but it seemed the closest action to what I want to achieve.
The UPTIME() function does not reset from a log out, only after a reboot.
But I do not see why you could not just instead set your threshold within an ordinary pause? The key is to trigger it, and here at my system, from quick tests I performed here now, the Engine Launch Trigger trigger more reliably after a log out than the Login trigger, (that I at least here now did not get to trigger reliably).
I set the variable UPTIME_SECONDS to UPTIME()
Then I have a While loop that runs while UPTIME_SECONDS < Threshold.
The loop pauses for 1 minute, and updates UPTIME_SECONDS to the current uptime.
I have the triggers set to login and unlock.
This looks like it will work. It's in testing and tweaking phase now.
A concern would be that some of those scans may be taking place on login, not just on boot. If so, the simplest method would be to simply start your login macro with an n-second pause, with n sized so you avoid the worst of the background processing.
If you do want to use "Pause Until" and UPTIME(), just
...for a 5 minute (300 seconds) delay.
If you don't want the frequent checks of even a "Reduce CPU Usage"-set "Pause Until" action you can roll your own version -- this will check every 10 seconds, pausing the macro until 5 minutes after boot: