Need help with script builder for tracking hours in Military Time with 15 min increments

I'm trying to make a form for people to track their hours. My organization makes it be in 15 minute increments and it has to be in military time format. We currently have a drop down with every 15 minutes, and they have to add up their total time themselves.
It would be amazing if I could get a script to have it add automatically. I only know how to do simple equations and it isn't working, plus sometimes they'll start working at 11pm and end at, say 1:30am. Is there a way to make it calculate that as 2.5 hours even though it crosses over midnight?
Any help would be appreciated!
