Event driven simulation of a garden sprinkler system