#include "timer.h" #include #include #include unsigned long temps_ecoule = 0; unsigned long temps = Microsecondes(); int time; int seconde_passee; int minutes = 0; int secondes = 0; //int a = 1; int temps_reference = 0; char afficher_temps[20]; int timer(void){ //unsigned long temps_ecoule = 0; //unsigned long temps = Microsecondes(); //int timer; //int seconde_passee; //int minutes = 0; //int secondes = 0; //int a = 1; //int temps_reference = 0; //char afficher_temps[20]; temps_ecoule = (int) (Microsecondes() - temps); if (temps_reference59){ minutes = secondes/60; secondes = secondes - (minutes * 60); } ChoisirCouleurDessin(CouleurParNom("black")); RemplirRectangle(675,25,160,30); ChoisirCouleurDessin(CouleurParNom("white")); snprintf(afficher_temps,15,"Time : %02d : %02d",minutes,secondes); EcrireTexte(700,50,afficher_temps,1); } } return EXIT_SUCCESS; }