diff --git a/fortran/test.f90 b/fortran/test.f90 index 8afb8f9b..f9526b57 100644 --- a/fortran/test.f90 +++ b/fortran/test.f90 @@ -62,9 +62,10 @@ subroutine process_problems(problem_ids, answers, long_runtime) print *, " Solution returned: ", answer end if tmp = second_count - first_count - tmp = (tmp + count_max) % count_max - time_elapsed = real(tmp) - time_elapsed = time_elapsed / real(count_rate) + if (tmp < 0) then + tmp = tmp + count_max + end if + time_elapsed = real(tmp) / real(count_rate) if (.NOT. long_runtime(i) .AND. time_elapsed > 60.0) then print *, " Error: problem ", problem_ids(i), " timed out!" print *, " Solution took : ", time_elapsed, "s" @@ -75,7 +76,7 @@ end subroutine process_problems integer function select_function(problem_id) integer, intent(in) :: problem_id - character(len=*) :: str + character(len=14) :: str select case (problem_id) case (1)