From 642a48039230b30c05170bde29ddcbf6d586b447 Mon Sep 17 00:00:00 2001 From: Axel Date: Thu, 8 Dec 2022 21:56:21 +0100 Subject: [PATCH] Ajout du makefile --- timer.c | 7 ++++--- timer.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/timer.c b/timer.c index d5c1c99..f185e81 100644 --- a/timer.c +++ b/timer.c @@ -2,11 +2,12 @@ #include #include -void timer(unsigned long* temps_ecoule, unsigned long temps_microsec){ +unsigned long timer(unsigned long temps_ecoule, unsigned long temps_microsec){ unsigned long temps_actuel = Microsecondes(); if (temps_actuel > temps_microsec + 1000000){ temps_microsec = temps_actuel; - *temps_ecoule++; - printf("%d",*temps_ecoule); + temps_ecoule += 1; + printf("%d",temps_ecoule); } + return temps_ecoule; } diff --git a/timer.h b/timer.h index 73c1c2b..64a6467 100644 --- a/timer.h +++ b/timer.h @@ -3,6 +3,6 @@ #define TIMER_H -void timer(unsigned long* temps_ecoule, unsigned long temps_microsec); +unsigned long timer(unsigned long temps_ecoule, unsigned long temps_microsec); #endif /* TIMER_H */