1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <time.h>
#include "./../../bibliotheque.h"
int main()
{
int TIME=GetTickCount();
int Heure=0;
int Minute=0;
int Seconde=0;
int Time=0;
while(1)
{
Time=(int)((GetTickCount()-TIME)/1000);
if ( (Time%1)==0 )
{
Seconde++;
//break;
}
if ( (Time%60)==0 )
{
Seconde=0;
Minute++;
//break;
}
else if ( (Time%3600)==0 )
{
Seconde=0;
Minute=0;
Heure++;
//break;
}
printf(" Heure:%d Minute:%d Seconde:%d Time:%d\n", Heure, Minute, Seconde, Time);
}
//getchar();
} |