perfInteractionAt function
The interaction whose window [startUs, closedAtUs ?? now] holds us, or
null when none does.
For a host that recorded a time without recording which gesture it belongs to (a span that began in the frame zone). When windows overlap the newest wins, as in activeInteraction. Unlike it, this reads the log and so answers after the session closed.
Implementation
PerfInteraction? perfInteractionAt(int us) {
final int now = FlutterTimeline.now;
for (final PerfInteraction interaction in _log.reversed) {
if (us >= interaction.startUs && us <= (interaction.closedAtUs ?? now)) {
return interaction;
}
}
return null;
}