I would actually do it in FormCalc.
This is what i did:
I created a repeating table (the row cells are all Date/Time Fields (Object/Binding tab/Data Format set to Time)
I also had a Total numericField and a button to repeat the rows



In the subTotal Calculate (FormCalc) event i have:
var startTime = Time2Num(this.resolveNode("fromTime").formattedValue, "HH:MM")
var finishTime = Time2Num(this.resolveNode("toTime").formattedValue, "HH:MM")
var total = Num2Time(this.resolveNode("subTotal").formattedValue, "HH:MM")
(finishTime - startTime) / 3600000
In the Total Calculate (FormCalc) event i have:
sum(Table1.Row1[*].subTotal[*]) //this calculates the column total as each row is added/edited.
Due to my format, times are typed into the From and To fields using 24 hour time with leading zeros and colon separators.
If you dont use a leading zero, the subtotal time will be wrong.

You can add more rows and the time total will continue to calculate
