In reply to ben@SystemVerilog.us:
Thanks, Ben.
$time return as the integer.
Using $realtime to have more accuracy.
It depends on env’s timescale setting
updated version, thanks for the feedback.
property glitch_p;
realtime first_change;
realtime duration = 10;
@(signal)
// detecting every 2 changes duration
(1, first_change = $realtime) |=> (($realtime - first_change) >= duration))[*1:$];
endproperty