I'm dealing with different APIs that use Integers to model duration. Only they can't seem to agree on the units. Sometimes it's seconds and sometimes it's milliseconds. 

So far the best way to avoid errors I've been able to find, is to use Hungarian notation: durationInMillis, durationInSeconds and so on.

It makes me wonder if there's not a better, truly OO way of modeling duration? Something that would allow the type system to help me avoid errors where I mistakenly treat a duration in milliseconds as a duration is seconds and vice versa.