SAE11_2022/timer.c

13 lines
311 B
C
Raw Normal View History

2022-12-02 22:14:06 +01:00
#include <stdlib.h>
#include <graph.h>
2022-12-08 11:53:33 +01:00
#include <stdio.h>
2022-12-02 22:14:06 +01:00
2022-12-08 11:53:33 +01:00
void 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);
2022-12-02 22:14:06 +01:00
}
}