make time function overrideable