Wrote function body for time_to_int