Fixed issue with time calculation on non Mac OSX sytems