From 7c72f5d8acf8eb88b24d490f92511d3e14e0542d Mon Sep 17 00:00:00 2001 From: Ferràn Quer i Guerrero Date: Thu, 22 May 2014 09:26:59 +0000 Subject: [PATCH] --- Project/applications/smartcities/test_timer-loop.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Project/applications/smartcities/test_timer-loop.c b/Project/applications/smartcities/test_timer-loop.c index d7ca6c7..4edd549 100644 --- a/Project/applications/smartcities/test_timer-loop.c +++ b/Project/applications/smartcities/test_timer-loop.c @@ -2,13 +2,13 @@ #include "timer-loop.h" /* Funcions que simulen comportament real */ -void testf(unsigned int delay, const char* premesg, const char* postmesg) +void testf(unsigned long delay, const char* premesg, const char* postmesg) { printf("%s\r\n",premesg); sleep_thread(delay); printf("%s\r\n",postmesg); } -unsigned int getNTPTime() +unsigned long getNTPTime() { testf(1,"Asking for NTP time...", "NTP time received"); return getSystemTime(); @@ -36,7 +36,7 @@ void main(void) // Code - int i = 1; + long i = 1; printf(",----------------.\r\n"); printf("| TIME LOOP TEST |\r\n"); printf("'----------------'\r\n\r\n"); @@ -44,10 +44,10 @@ void main(void) printf("--------\r\n"); printf("Loop #0\r\n\r\n"); - unsigned int time = getNTPTime(); - unsigned int timestamp = 0; - unsigned int delay = getSystemTime(); - unsigned int delay2 = 0; + unsigned long time = getNTPTime(); + unsigned long timestamp = 0; + unsigned long delay = getSystemTime(); + unsigned long delay2 = 0; sleep_thread(SHORT_PERIOD - time%SHORT_PERIOD); //int* a_rawData; -- libgit2 0.22.2