Recording the total length of time relating to the status of a variable

A timer handle struct, for example. You could use this, with Time set to a really big number: