Calculating Total Time in Seconds

When you said easily generated, did you mean there is an easier way to get the time between timestamps and sum them up?

Or did you mean a query similar to discussed here used with
lead(t_stamp) over (partition by machine order by t_stamp)
to omit other machines if the table has many machines