Calculate time difference between true/false timestamp
I have a requirement where I have to calculate the time difference between two instances of the PumpRunSignal property (Boolean), we need to determine the duration in minutes. The Pump Run Signal is a Boolean property that triggers an event data subscription and a service call when there is a change from true to false in the input from the PLC. We calculate the time difference by comparing the timestamps of index values 1 and 0 of the PumpRunSignal. However, there is a delay in loading data from Thingworx to InfluxDB when there is a false signal. To address this delay, we have implemented a 30-second Pause every time there is a false signal. While this pause logic seems effective, there is some uncertainty about its reliability, especially when dealing with multiple calculations for each Thing within Thingworx.
Thank you!


