N@Stopwatch I@Start Stop Reset O@Current Lap Record # Increment time for each clock pulse clk() -> Time += 0.02, schedule(20); # Start the clock, also restart ~Start & Start -> Running & (Time < Record | !Record) -> Record = Time; Lap = Time, Time = 0 Running = 1, schedule(20); # Stop the clock and update times ~Stop & Stop & Running -> Lap = Time Time < Record | !Record -> Record = Time; Running = 0, schedule(0); # Reset all values and stop the clock Reset -> Time = Lap = Record = 0 Running = 0, schedule(0); Current = Time