samples: net: syslog: Fix to use proper data type for sleep

Needed because of k_timeout_t conversion

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2020-04-06 17:40:57 +03:00
commit a85d1e0e74

View file

@ -12,14 +12,14 @@ LOG_MODULE_REGISTER(net_syslog, LOG_LEVEL_DBG);
#include <net/net_core.h> #include <net/net_core.h>
#include <net/net_pkt.h> #include <net/net_pkt.h>
#define SLEEP_BETWEEN_PRINTS K_SECONDS(3) #define SLEEP_BETWEEN_PRINTS 3
void main(void) void main(void)
{ {
int count = K_SECONDS(60) / SLEEP_BETWEEN_PRINTS; int count = 60 / SLEEP_BETWEEN_PRINTS;
/* Allow some setup time before starting to send data */ /* Allow some setup time before starting to send data */
k_sleep(SLEEP_BETWEEN_PRINTS); k_sleep(K_SECONDS(SLEEP_BETWEEN_PRINTS));
LOG_DBG("Starting"); LOG_DBG("Starting");
@ -29,7 +29,7 @@ void main(void)
LOG_INF("Info message"); LOG_INF("Info message");
LOG_DBG("Debug message"); LOG_DBG("Debug message");
k_sleep(SLEEP_BETWEEN_PRINTS); k_sleep(K_SECONDS(SLEEP_BETWEEN_PRINTS));
} while (count--); } while (count--);