From 438547e390001ee1b60cb77b4eeb56dd11181813 Mon Sep 17 00:00:00 2001 From: orfao Date: Sat, 2 Dec 2023 17:21:07 +0100 Subject: [PATCH] test --- src/timer.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/timer.c b/src/timer.c index 73a921a..691e9e3 100644 --- a/src/timer.c +++ b/src/timer.c @@ -1,28 +1,25 @@ #include #include #include -#define delta 1000000L void creer_timer(void){ - int sec; - unsigned long temps; - temps=Microsecondes(); - while(sec!=10){ - temps=Microsecondes+delta; - printf("%d\n",sec); - sec=temps%11; + int sec = 0,mil_sec=0,min=0; + unsigned long temps = 0; + printf("temps : %lu\n",temps); + while(min<=2){ + printf("[%d:%d,%d]\n",min,sec,mil_sec); + temps=Microsecondes(); + printf("temps : %lu\n",temps); + sec=(temps/1000000)%60; + mil_sec=(temps/1000)%101; + min=(temps/60000000)%60; + printf("[%d:%d,%d]\n",min,sec,mil_sec); } } - - - - - - int main(void){ InitialiserGraphique(); - CreerFenetre(0,0,1300,1300); creer_timer(); FermerGraphique(); + return EXIT_SUCCESS; } \ No newline at end of file