From: Siraaj Khandkar Date: Mon, 3 Sep 2012 18:42:55 +0000 (-0400) Subject: Check sleep interval before sleeping. X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=8cf59f0f0332f2ee186f4fd8ae5ca00cba00e673;p=cellular-automata.git Check sleep interval before sleeping. --- 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