Benchmarking C++ functions' execution speed with GPIO and oscilloscope
Well, you'll have to read the manual for the scope and learn how triggering works.
Besides that, use the &quot;Measure&quot; feature to have it display the width of the pulse:

First, use this code:
// set GPIO signal
// clear GPIO signal

Measure pulse width, this will give you a baseline. Then, use this code:
// set GPIO signal
a();
// clear GPIO signal

Measure pulse width again, substract the previously measured baseline, and you get a timing for function a().