Thanks for the ideas guys.
@joe I am not sure what you mean, perhaps I can try make myself a little bit clearer with a more concrete example. Let's say I start the monitoring at 22:00. Let's also say that in general I want to start a new action whenever the existing macro has been running for 10,000 seconds.
A straightforward query of the Date/Time string would not work, because as you say the number of seconds gets reset, so I need extra logic that won't be confused by a midnight change, preferably not relying on outside scripts, but of course will look at that if it is the only viable solution.