Difference between history tag timestamp

I have a Boolean tag that i am logging history on. I would like to graph or put in a table the elapsed time between the timestamps when it is true. any help would be appreciated.