質問

 #include <stdio.h>
#include <time.h>   
int main (void)
{
double diff = 0.0;
time_t start;
time_t stop;
time(&start);
print("Enter millisecond to stop"); 
.

では、指定されたタイマーの間隔の後にコードとは何を停止するべきかを追加する必要があります。

役に立ちましたか?

解決

int seconds;
scanf ("%d",&seconds);
stop = 0;
while (stop < start + seconds)
    time(&stop);
.
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top