fork download
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. int main(void) {
  5. clock_t begin;
  6. double time_spent = 0;
  7. while (time_spent < 3.0) {
  8. time_spent = (double)(clock() - begin) / CLOCKS_PER_SEC;
  9. }
  10. printf("timeout\n");
  11. }
  12.  
Success #stdin #stdout 3s 5308KB
stdin
Standard input is empty
stdout
timeout