mise à jour

This commit is contained in:
2023-12-10 22:51:36 +01:00
parent 81aa9fae9b
commit eaea71caa3
5 changed files with 47 additions and 19 deletions

View File

@@ -11,15 +11,21 @@ int main(void) {
unsigned long suivant;
unsigned int secondes = 0, minutes = 0;
/* int* time = NULL; */
/* time = malloc( sizeof(short int));
time[0] = 0;
time[1] = 0; */
suivant = Microsecondes() + CYCLE;
printf("%d : %d\n", minutes, secondes);
/*printf("%d : %d\n", &time[0],&time[1]);*/
while (1) {
if (Microsecondes() > suivant) {
if (Microsecondes() > suivant) {
@@ -28,17 +34,16 @@ int main(void) {
suivant = Microsecondes()+CYCLE;
secondes++;
/*time[1]++;
if ( secondes == 60) {
if ( time[1] == 60) {
secondes = 0;
time[1] = 0;
minutes ++;
time[0] ++;
}
printf("%d : %d\n", minutes,secondes);
}*/
printf("%lu", Microsecondes());
@@ -47,8 +52,19 @@ int main(void) {
}
/* if ( ToucheEnAttente() == 1 ) {
if (Touche() == XK_space) {
break;
}
}*/
}
}
return EXIT_SUCCESS;
}