DELAY_5.C
Upload User: qq5388545
Upload Date: 2022-07-04
Package Size: 29849k
Code Size: 0k
Category:

GUI Develop

Development Platform:

C/C++

  1. #include <stdio.h>
  2. #include <time.h>
  3. void main (void)
  4.  {
  5.     time_t current_time;
  6.     time_t start_time;
  7.     printf("About to delay 5 secondsn");
  8.     time(&start_time);  // Get starting time in seconds
  9.     do {
  10.       time(&current_time);
  11.     } while ((current_time - start_time) < 5);
  12.     printf("Donen");
  13.  }