Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Rate-counter/HicEst/rate-counter.hicest
Normal file
20
Task/Rate-counter/HicEst/rate-counter.hicest
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
CHARACTER prompt='Count "Hits++" for 5 sec, get current rate'
|
||||
|
||||
DLG(Button="1:&Hits++", CALL="cb", B="2:&Count 5sec", B="3:&Rate", RC=retcod, TItle=prompt, WIN=hdl)
|
||||
|
||||
SUBROUTINE cb ! callback after dialog buttons
|
||||
IF(retcod == 1) THEN ! "Hits++" button
|
||||
Hits = Hits + 1
|
||||
ELSEIF(retcod == 2) THEN ! "Count 5 sec" button
|
||||
Hits = 0
|
||||
ALARM(5, 5) ! call F5 in 5 seconds
|
||||
t_start = TIME()
|
||||
ELSE ! "Rate" button
|
||||
sec = TIME() - t_start
|
||||
WRITE(StatusBar) 'Average rate since last "5 sec" button = ', hits/sec, " Hz"
|
||||
ENDIF
|
||||
END
|
||||
|
||||
SUBROUTINE F5 ! called 5 sec after button "5 sec"
|
||||
WRITE(StatusBar) Hits, "hits last 5 sec"
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue