Advertisement
KDOXG

The Perfect Timer Example

Oct 21st, 2019
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. int main(int argc, char* argv[])
  5. {
  6.     int input;
  7.     scanf("%d", &input);
  8.     time_t init = time(NULL);
  9.     while (time(NULL)-init < input);    //yield
  10.     return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement