Question

 #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"); 

so what is code should add to stop timer after given interval of timer

Was it helpful?

Solution

int seconds;
scanf ("%d",&seconds);
stop = 0;
while (stop < start + seconds)
    time(&stop);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top