W jaki sposob najprosciej zmierzyc czas dzialania programu ?
Probuje cos takiego :
#include <time.h>
#include<iostream.h>
main()
{
time_t home,end;
double czas;
int j;
(void) time(&home);
for (int i=1 ;i++;i<200000000)
j=i*7;
(void) time(&end);
czas=difftime(end,home);
cout <<"Twoj czas"<<"\t"<<czas;
getchar();
}
Ale w wyniku otrzymuje :
The current time is: " tutaj podany jest aktualny czas systemowy"
Enter the new time : "tutaj moge sobie zmienic czas"
....
A dlaczego nie pokazuje mi czasu wykonania programu ?