Writing code that deals with time values