Instead of creating a true Duration type, I use unused bits of the long which stores durations.
The idea is that the algorithms will run faster because there is no object churn and fewer function
calls.
public static long useTimeUnitOfInNone(long duration, long durationWithUnit)(Code)
Use the time unit of another duration if this duration has none
Parameters: duration - input duraiton Parameters: durationWithUnit - duration that has time unit the original duration if it had a time unit, otherwise the duration with the time unit of durationWithUnit