From 8cf59f0f0332f2ee186f4fd8ae5ca00cba00e673 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Mon, 3 Sep 2012 14:42:55 -0400 Subject: [PATCH] Check sleep interval before sleeping. --- forest-fire/001/src/forest_fire.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forest-fire/001/src/forest_fire.ml b/forest-fire/001/src/forest_fire.ml index 272815f..66285a9 100644 --- a/forest-fire/001/src/forest_fire.ml +++ b/forest-fire/001/src/forest_fire.ml @@ -177,7 +177,7 @@ let next_generation forest (width, height) prob = let rec burn forest size prob interval = term_reset (); print_forest forest; - minisleep interval; + if interval > 0.0 then minisleep interval; burn (next_generation forest size prob) size prob interval -- 2.20.1