PDA

View Full Version : Display time a device has been on (stopwatch)?



yamy125
June 14th, 2010, 03:16 AM
Hi,

I'm just after a basic option to display the amount of time a device has been on. I'm assuming this may well be possible with the NR.Clock function, but not too sure how to go about it. It is for a coffee machine that needs a good 1/2hr to warm up, and I would like to have a stopwatch style display under my on/off button that starts counting when the state changes. I have 2 states based on a Girder LUA rule to display 'on' state, so I'm guessing I can somehow trigger the 'stopwatch' based on this same rule?

Any help much appreciated.

Cheers

Rob H
June 14th, 2010, 08:37 AM
You can't really use NR.Clock for this, but you could use a timer to do it and the RAHDateFuncs.lua library

yamy125
June 14th, 2010, 08:56 AM
You can't really use NR.Clock for this, but you could use a timer to do it and the RAHDateFuncs.lua library

Thanks Rob. I'll have a bit of a read up on that function.

Cheers