Hi all I am currently working on a project where when a certain event happens details about the event including the time that the event occurred is added into a list array.
I use this to avoid negative interval.
var seconds = (date1< date2)? (date2- date1).TotalSeconds: (date1 - date2).TotalSeconds;