ajout fichiers maj_fenetre.c et .h
This commit is contained in:
34
snake/time.c
Normal file
34
snake/time.c
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <graph.h>
|
||||
#include <stdio.h>
|
||||
#include <maj_fenetre.h>
|
||||
|
||||
|
||||
|
||||
#define CYCLE 10000L
|
||||
|
||||
|
||||
int main(void) {
|
||||
|
||||
|
||||
|
||||
suivant= Microsecondes()+CYCLE;
|
||||
|
||||
|
||||
while (1!=0){
|
||||
|
||||
if (Microsecondes()>suivant){
|
||||
|
||||
|
||||
|
||||
/* une periode s'est écoulé */
|
||||
/* prochaine date */
|
||||
|
||||
suivant= Microsecondes()+CYCLE;
|
||||
}
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Reference in New Issue
Block a user