#include <stdio.h>
#include <time.h>
#include <windows.h>
void Task()
{
printf("Hi");
}
int main ( ) {
time_t t;
clock_t start, end;
long i;
long count;
double x = 0.0;
count = 2;
start = clock();
time(&t);
printf(ctime(&t));
printf( "Counting to %ld\n", count );
if(count)
{
Task();
}
end = clock();
printf( "That took %f seconds and I counted up to %ld", (((double)(end-start)/CLOCKS_PER_SEC)), count );
printf( "\nThat also took %d clock tics\n ", clock());
return 0;
}
Task 関数の実行にかかった開始時刻と終了時刻を取得したいと考えています。Task 関数の割り込みを作成しようとしていますが、プログラムに Hi が表示されます。私はそれで成功していません。ですから、これに関して誰かが私を導くことができますか?