2N/A/* Pausing execution of the current thread. 2N/A Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. 2N/A Written by Bruno Haible <bruno@clisp.org>, 2007. 2N/A This program is free software: you can redistribute it and/or modify 2N/A it under the terms of the GNU General Public License as published by 2N/A the Free Software Foundation; either version 3 of the License, or 2N/A (at your option) any later version. 2N/A This program is distributed in the hope that it will be useful, 2N/A but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A GNU General Public License for more details. 2N/A You should have received a copy of the GNU General Public License 2N/A /* Sleep for 1 second many times, because 2N/A 1. Sleep is not interruptiple by Ctrl-C, 2N/A 2. we want to avoid arithmetic overflow while multiplying with 1000. */ 2N/A/* Guarantee unlimited sleep and a reasonable return value. Cygwin 2N/A 1.5.x rejects attempts to sleep more than 49.7 days (2**32 2N/A milliseconds), but uses uninitialized memory which results in a 2N/A /* This requires int larger than 16 bits. */ 2N/A const unsigned int limit =
49 *
24 *
60 *
60;
2N/A#
else /* !HAVE_SLEEP */ 2N/A #
error "Please port gnulib sleep.c to your platform, possibly using usleep() or select(), then report this to bug-gnulib."