Catch exceptions early in timeit.timeit

This commit is contained in:
K. Lange 2022-05-23 10:16:07 +09:00
parent 4a052191de
commit cb14875406

View File

@ -24,6 +24,7 @@ KRK_FUNC(timeit,{
for (krk_integer_type t = 0; t < times; ++t) {
krk_push(argv[0]);
krk_callStack(0);
if (unlikely(krk_currentThread.flags & KRK_THREAD_HAS_EXCEPTION)) return NONE_VAL();
}
gettimeofday(&tv_after,NULL);