Sorry for the confusion. The button release function in the original coude should provide the duration that the button was pressed. It now alwas says “0”. It seems as if the rise or fall is not detected correctly in processing the interrupt.
PS. I just read your comment on Github about this issue.