Hi there community!
I´m trying to calculate the cumulative time that an issue has been flagged, but I´m not convinced with the values that I´m receiving.
Long story short, I´ve created a field called Idle Time to receive the time flagged in seconds and I'm trying to print the total value of this field as a comment. I´m using the issue.dueDate field to save the moment that the issue was flagged with {{now}}
This is the data that I´m using to populate the Idle Time:
{{#=}}{{issue.Idle Time}} + {{now.diff(issue.Due Date).Seconds.abs}}{{/}}
This is the data that I´m using to comment the issue after removing the flag:
{{issue.Due Date.diff(now.plusSeconds(issue.customfield_10198)).prettyPrint}}
This is the automation that I made:

The problem is that the value that I´m receiving in Idle Time Field seems to be wrong according to the time that the issue was flagged. For example, if I block the issue for 10 seconds, it display a crazy value like 39000 (milliseconds maybe?)
What am I missing here?