题
#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);
. 不隶属于 StackOverflow