https://github.com/Kitware/CMake
Raw File
Tip revision: 6ab08c4e99469439900c1cdc02fd2452ab268a87 authored by Brad King on 10 July 2020, 10:49:28 UTC
CMake 3.18.0-rc4
Tip revision: 6ab08c4
sleep.c
#if defined(_WIN32)
#  include <windows.h>
#else
#  include <unistd.h>
#endif

#include <stdio.h>

int main(void)
{
  fprintf(stderr, "before sleep\n");
  fflush(stderr); /* should not be needed, but just in case */
#if defined(_WIN32)
  Sleep((TIMEOUT + 4) * 1000);
#else
  sleep((TIMEOUT + 4));
#endif
  fprintf(stderr, "after sleep\n");
  fflush(stderr); /* should not be needed, but just in case */
  return 0;
}
back to top