<?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>Problem with a timed waiting method</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72722/problem-with-a-timed-waiting-method</link><description>I am using a thingy:91 device. I am basically just attempting to write a method that will just wait for a certain amount of seconds (ie: 10 or longer). This is my code below, however, when it runs, time(NULL) and time(0) return a value of -1, and therefore</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Mar 2021 12:13:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72722/problem-with-a-timed-waiting-method" /><item><title>RE: Problem with a timed waiting method</title><link>https://devzone.nordicsemi.com/thread/300112?ContentTypeID=1</link><pubDate>Tue, 16 Mar 2021 12:13:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f08bf48a-b972-47b2-a337-ec63f80eb22c</guid><dc:creator>RSemple</dc:creator><description>&lt;p&gt;Thank you, that was exactly what I was looking for. Have a great day!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with a timed waiting method</title><link>https://devzone.nordicsemi.com/thread/299787?ContentTypeID=1</link><pubDate>Mon, 15 Mar 2021 13:03:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b54d30e3-6e1a-4ba8-95b2-5b507610704b</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Not sure what is wrong here since I am not familiar with the time() library. I instead recommend to use the k_sleep() api, since that will reduce current consumption and also allow other threads to be serviced:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/kernel/scheduling/index.html?highlight=k_sleep"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/kernel/scheduling/index.html?highlight=k_sleep&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you are interested in the date time library I could find this case:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/66410/nrf9160-date-time-example"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/66410/nrf9160-date-time-example&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>