Hey Vinny and welcome to our community!
Before going into details I’d like to point you to a few existing topics that I believe include the solution to your question and will teach you a few things on the way.
Let us know how far you got with that
Edit: Your solution already looks good, you’ll just have to convert milliseconds to something meaningful.