Timer to show how many hours of gas left in generator tank, best way to approach?

I have multiple flows that start or stop a generator based on various things.

I have one flow that checks when the generator runs out of gas and then de-energizes the relay so it doesn't try to start. Then when I fill it, I click a dashboard button and its status goes back to filled.

What I would like to do now is to reset a global variable to 6 hours (one tank of gas) when I press that "I filled it" button, and then when a flow starts the generator, have it show a count-down timer so I can visually see how much fuel is left. And have the timer pause when a flow stops the generator.

What is the best way to go about this? Is there a custom node I should download and explore? Or perhaps I should have my generator start and stop functions also start or stop a trigger node? Or perhaps I should have them write to a text file with a timestamp and have another function do the math?

Thanks in advance for any best practice tips.

I just ended up using javascript and .getTime() and doing a bit of math and now I have it all working. Nothing pretty, but it works.