- #include <stdio.h>
- #include <iostream.h>
- #include <windows.h>
-
- int main(int argc, char* argv[])
- {
- int st = GetTickCount();
-
- //instructions à chrono. Ici un cout et un Sleep
- cout << "abcdefghijklmnopqrstuvwxyz" << endl;
-
- Sleep(1000); // pour ne pas aoir un tps d'exec = 0
- int stop = GetTickCount();
-
- char *s = new char[50];
- sprintf(s,"Executed in %d ms",stop-st);
-
- cout << s << endl;
-
- delete[] s;
- return 0;
- }
#include <stdio.h>
#include <iostream.h>
#include <windows.h>
int main(int argc, char* argv[])
{
int st = GetTickCount();
//instructions à chrono. Ici un cout et un Sleep
cout << "abcdefghijklmnopqrstuvwxyz" << endl;
Sleep(1000); // pour ne pas aoir un tps d'exec = 0
int stop = GetTickCount();
char *s = new char[50];
sprintf(s,"Executed in %d ms",stop-st);
cout << s << endl;
delete[] s;
return 0;
}