D
Daffyduck
hi,
is possible to get in seconds with a precision of 0.0000 the time get
by one function ?
i check clock() but im getting 0 with this:
1 #include <stdio.h>
2 #include <time.h>
3
4 int
5 main(){
6 float time1, time2;
7 int a;
8 time1 = clock();
9 for(a=0;a<100; a++){
10 printf("a");
11 }
12 time2 = clock();
13 printf("seconds: %f\n",((float)tempo2 - (float)tempo1) /
CLOCKS_PER_SEC);
14 }
is possible to get in seconds with a precision of 0.0000 the time get
by one function ?
i check clock() but im getting 0 with this:
1 #include <stdio.h>
2 #include <time.h>
3
4 int
5 main(){
6 float time1, time2;
7 int a;
8 time1 = clock();
9 for(a=0;a<100; a++){
10 printf("a");
11 }
12 time2 = clock();
13 printf("seconds: %f\n",((float)tempo2 - (float)tempo1) /
CLOCKS_PER_SEC);
14 }