I feel like this would be better as simple math. I don't really see any problem with floats here, the clock's not going to be accurate enough for it to matter anyway.