I’m starting to think this loop length function is used for something else.
I found the following discussion which describes a feature that might be related to what this function is about.
So if this is not how you get the duration then how do you do it? When searching all I can find is people asking for a way but there doesn’t seem to be one, which is surprising to me.