ajout test timer graphique

This commit is contained in:
Marco ORFAO 2023-12-05 21:22:05 +01:00
parent 7ef4318575
commit dfb98b4b2f

View File

@ -2,16 +2,21 @@
#include<stdlib.h> #include<stdlib.h>
#include<graph.h> #include<graph.h>
void afficher_timer(void){
EcrireTexte(0,0,coucou,2);
}
void creer_timer(void){ void creer_timer(void){
int sec = 0,mil_sec=0,min=0; int sec = 0,mil_sec=0,min=0;
unsigned long temps = 0,t1=0; unsigned long temps = 0,t1=0;
t1=Microsecondes(); t1=Microsecondes();
while(sec<=12){ while(min<=12){
printf("[%0.2d:%0.2d]\n",min,sec); printf("[%0.2d:%0.2d]\n",min,sec);
temps=Microsecondes()-t1; temps=Microsecondes()-t1;
min=(temps/60000000)%60; min=(temps/60000000)%60;
temps=temps%60000000; temps=temps%60000000;
sec=(temps/1000000)%60; sec=(temps/1000000)%60;
EcrireTexte();
} }
} }