#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