bonjour

je travaille sur un projet visual c++ /CLR mode console

comment faire pour r�cup�rer l'horloge syst�me en microseconde

Affichage heure:minute:seconde:microseconde

le programme suivant marche tr�s bien mais compatible avec d'autres plateformes :

Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
#include <stdio.h>
#include <sys/time.h>
int main(void)
{
     struct timeval tv;
     struct timezone tz;
     struct tm *tm;
     gettimeofday(&tv, &tz);
     tm=localtime(&tv.tv_sec);
     printf(" %d:%02d:%02d %ld \n", tm->tm_hour, tm->tm_min,tm->tm_sec, tv.tv_usec);
return 0;
}
1000 merci