duration = TimeMonitoring(u=...).y;
Real output y is the duration in seconds, since the input u was true.
This block is demonstrated with the following example:
results in