Problem with this... Lets say ISTIME is called LATE - it can't compensate for this so accurate timing is impossible... surely needs to compensate and ensure that timer overflow doesn't mess anything up. Perhaps some may not want that compensation, a flag could allow both versions..
In case that's not clear, lets say we need this to run every 50ms. We come in late at 52ms... and the timeMark is reset for another 50ms. It SHOULD be set to 48ms to compensate for us being late this time. Also technically we're potentially creeping a fraction of a millisecond each time we use this.