<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Measuring time execution on nrf52840</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/87232/measuring-time-execution-on-nrf52840</link><description>Hi Friends! 
 I want to do this on the nrf52840: 
 time start 
 do some code 
 time stop 
 print stop-start and get time 
 Im using nrf connect extension for VScode 
 Does anybody know how to do this? 
 Thanks!</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Fri, 22 Apr 2022 12:56:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/87232/measuring-time-execution-on-nrf52840" /><item><title>RE: Measuring time execution on nrf52840</title><link>https://test-devzone.nordicsemi.com/thread/364487?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 12:56:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57872602-8f99-4d17-baba-cb23c8b466ff</guid><dc:creator>user107683</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;You could use the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/kernel/timing/clocks.html"&gt;kernel timing functionality&lt;/a&gt;&amp;nbsp;to track and time your code. In addition to this library, the&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/topic/exercise-3-7/"&gt;Nordic Academy NCS funcamentals course&lt;/a&gt;&amp;nbsp;contains a topic on multithreaded applications which uses k_uptime_get() and k_uptime_delta to monitor elapsed runtime of a function.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I believe these two resources should be sufficient to perform the desired task! Let me know if you have any more questions regarding this topic!&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>