node chrono(StSt, Rst:bool) returns (disp_1, disp_2:int) -- 1 tick=10ms var run: bool; cs, s, m: int; let automaton COUNT initial state CHRONO let automaton Sub initial state STOP unless StSt resume START let s = 0 -> last s; m = 0 -> last m; run = false; tel; state START unless StSt resume STOP let cs = 0 -> (pre ms + 1) mod 100; s = if cs < pre cs then (last s + 1) mod 60 else last s; m = if s < last s then (last m + 1) mod 60 else last m; run = true tel; until Rst and not run restart CHRONO; automaton DISPLAY initial state TIME let disp_1 = s; disp_2 = m; tel until Rst and run restart LAP; state LAP disp_1 = last disp_1; disp_2 = last disp_2; until Rst restart TIME; end tel