AnsweredAssumed Answered

Measure execution time (MQX 4.1)

Question asked by Michael Wahler on Jan 6, 2015
Latest reply on Jan 8, 2015 by David E Seymour

Hi,

 

What is the best way of measuring the execution time of a function with nanosecond precision on MQX 4.1?

 

What I have in mind is something like

 

uint32_t start = get_time ();

f();

uint32_t delta = get_time () - start;

 

However, _time_get_nanoseconds () does not work for me because there is a timer interrupt during the execution of f().

 

Any ideas?

 

Regards,

 

Michael

Outcomes