The answer seems overly complicated.
Using a From, To and Total date/time fields set to time input.
In the Total field enter FormCalc script as below:
var startTime = Time2Num(From.formattedValue, "HH:MM")var finishTime = Time2Num(To.formattedValue, "HH:MM")var total = Num2Time(Total.formattedValue, "HH:MM")(finishTime - startTime) / 3600000
The answer is in minutes.
Set the Display and Edit patterns to 'time{HH:MM}' for each field (without quotes). It wont calculate correctly if the finish time is before the start time. Eg: From 15:00 To 00:30 won't give the right answer. A date would need to be added to calculate it properly.