Added time function

Added time function to convert seconds into a readable format.