You need to find the datapoints where it started to run and where it stopped to run.
If your data is stored in the database, you can do this via xpath, otherwise you may need to sort and filter the list (Sort by timestamp, filter by running status and grab the head of the list)
If you have the two datapoints, you can use the secondsBetween function to get the amount of seconds between the two timestamps (You can also use millisecondsBetween, minutesBetween,...