This sounds useful, perhaps KR.DUR t p (track, pos) in milliseconds. I’ve been trying to think if there’s a good way to consolidate all the Kria parameters you might want to know into fewer ops, but probably you mostly want like duration, final computed note, maybe to know if a given trigger position is active. For the time being with Teletype 3.1.0 you should be able to measure gate length:
# I
SCRIPT.POL 1 3
# 1
IF EZ STATE 1: X TIME
ELSE: TIME 0
SCRIPT.POL 1 3 or $.POL 1 3 configures the polarity of trigger input 1 to 3 (execute on both rising and falling edges).