test
This commit is contained in:
parent
c105dcc6e4
commit
438547e390
25
src/timer.c
25
src/timer.c
@ -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;
|
||||||
|
printf("temps : %lu\n",temps);
|
||||||
|
while(min<=2){
|
||||||
|
printf("[%d:%d,%d]\n",min,sec,mil_sec);
|
||||||
temps=Microsecondes();
|
temps=Microsecondes();
|
||||||
while(sec!=10){
|
printf("temps : %lu\n",temps);
|
||||||
temps=Microsecondes+delta;
|
sec=(temps/1000000)%60;
|
||||||
printf("%d\n",sec);
|
mil_sec=(temps/1000)%101;
|
||||||
sec=temps%11;
|
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;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user