diff --git a/c-programming/experiments/clock-malfunction-imitation.c b/c-programming/experiments/clock-malfunction-imitation.c index d316d08..16310f1 100644 --- a/c-programming/experiments/clock-malfunction-imitation.c +++ b/c-programming/experiments/clock-malfunction-imitation.c @@ -67,9 +67,8 @@ time_t clock_exponential_growth(time_t* x) { if (ticks_before_accident == 0) { y += counter++; counter *= counter; - } else { + } else ticks_before_accident--; - } CLOCK_FUN_END } @@ -108,9 +107,9 @@ time_t clock_reverse(time_t* x) { static time_t counter = 1, old_time; - if (ticks_before_accident == 0) { + if (ticks_before_accident == 0) y = old_time - counter++; - } else { + else { time(&y); old_time = y; ticks_before_accident--;