print_time function