This commit is contained in:
Marco ORFAO 2023-12-02 17:21:07 +01:00
parent c105dcc6e4
commit 438547e390

View File

@ -1,28 +1,25 @@
#include<stdio.h> #include<stdio.h>
#include<stdlib.h> #include<stdlib.h>
#include<graph.h> #include<graph.h>
#define delta 1000000L
void creer_timer(void){ void creer_timer(void){
int sec; int sec = 0,mil_sec=0,min=0;
unsigned long temps; unsigned long temps = 0;
temps=Microsecondes(); printf("temps : %lu\n",temps);
while(sec!=10){ while(min<=2){
temps=Microsecondes+delta; printf("[%d:%d,%d]\n",min,sec,mil_sec);
printf("%d\n",sec); temps=Microsecondes();
sec=temps%11; 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){ int main(void){
InitialiserGraphique(); InitialiserGraphique();
CreerFenetre(0,0,1300,1300);
creer_timer(); creer_timer();
FermerGraphique(); FermerGraphique();
return EXIT_SUCCESS;
} }