Added time function for OSX.