Examples
banshee/examples-collection/examples/mechanics/
durations
Example: for, in passes and in time; the response time of a web page.
par banshee1 installation1 version
Publiée le 27 octobre 2026. First version in this collection.
Durations: for
for makes a watch raise only when its condition holds for a while. Here, the response time of a page: slow for three passes, very slow for ten minutes.
How to read it
'for' => '3 runs': the condition holds at this pass and the two before. One slow pass alone raises nothing.'for' => '10 min': the condition holds at every pass for at least ten minutes, whatever the interval of the probe.- A duration is a whole number from 1 to 10 000, a blank, a unit:
s,min,h,dfor a time, 30 days at most;runorrunsfor passes, inforonly. Withoutfor,'1 run': the watch raises at once. - A pass where the condition does not hold, or where the value is missing, makes the count start again.
forexists onabove,below,deviate,stateandexpect. The other durations arewindowofincrease, the thresholds ofsilence,aheadofaboveandbelow, and thedurationsetting of acustom.
To adapt it
$answer['time']is in milliseconds, connection included.