java.util.concurrent.TimeUnit handles this stuff pretty well