Calculate percentage between time

Thanks Colin!

I spend hours watching node-red Essentials.

I made the runtime msg.runtime
And the downtime msg.downtime
In de debug menu I see the values in seconds from msg.runtime and msg.downtime

I made a function node where I want to calculate the uptime by: runtime minus downtime .

Like the example: Percent calculation

But it doesn't work properly :frowning:
I have no idea why. It's driving me crazy! :triumph:

What am I doing wrong? :thinking:

runtime