<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://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>Have any delay API can call?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88056/have-any-delay-api-can-call</link><description>Hi, 
 I&amp;#39;m a beginner, I want to do a test that will create a thread by &amp;quot;K_THREAD_DEFINE&amp;quot; marco. 
 Then I will continuous print &amp;quot;Hello~~~&amp;quot; per second. That&amp;#39;s all. 
 But I don&amp;#39;t know that what delay API should I call? 
 
 below is my test code 
 
 Have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 May 2022 13:17:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88056/have-any-delay-api-can-call" /><item><title>RE: Have any delay API can call?</title><link>https://devzone.nordicsemi.com/thread/369672?ContentTypeID=1</link><pubDate>Thu, 26 May 2022 13:17:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16ce2810-0204-496a-8d09-f347173c9670</guid><dc:creator>PrinceKuo</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;I had verified your suggestion.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s workable. Thanks ~~&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Prince&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Have any delay API can call?</title><link>https://devzone.nordicsemi.com/thread/368575?ContentTypeID=1</link><pubDate>Thu, 19 May 2022 11:18:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:895f6c84-c944-433c-8a8c-2a93b773cff4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi PrinceKuo,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can use k_sleep() to put the Thread to sleep.&lt;/p&gt;
&lt;p&gt;For example if you want to put the thread to sleep for 10 seconds you can do this:&amp;nbsp;&lt;span&gt; &lt;/span&gt;k_sleep(K_SECONDS(10));&lt;/p&gt;
&lt;p&gt;You can also&amp;nbsp;use k_msleep() or k_usleep() , have a look &lt;a href="https://docs.zephyrproject.org/3.0.0/reference/kernel/threads/index.html#c.k_sleep"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can read more about zephyr scheduling &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/kernel/services/scheduling/index.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>