open-insight/LSL2/STPROC/CALC_ELAP.txt
2024-03-25 14:46:21 -07:00

15 lines
320 B
Plaintext

compile function calc_elap(DateIn, TimeIn, DateOut, TimeOut)
Tot = 0
if DateOut and DateIn then
DateDiff = DateOut - DateIn
SecondsToAdd = 0
if DateDiff then
SecondsToAdd = 86400*DateDiff
end
Tans = ( TimeOut + SecondsToAdd ) - TimeIn
Tot = ( ( Tans /3600) *100 )
end
return Tot