From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
What I posted above is the typical way of timing how long that a piece of code takes to execute. After reading your question again this will probably not help much.
What you need is to record the time that each button was pressed in an event structure using a shift register. You can then take the difference.