As reported in the R binding to libfswatch here: r-lib/watcher#32 (comment).
File: libfswatch/src/libfswatch/c++/windows_monitor.cpp:234
Bug:
POSIX sleep() from <unistd.h> has the following signature:
unsigned int sleep(unsigned int seconds);
This leads to an implicit truncation when a double < 1.0 is passed to sleep():
e.g. sleep(0.5) → sleep(0)
As reported in the R binding to
libfswatchhere: r-lib/watcher#32 (comment).File:
libfswatch/src/libfswatch/c++/windows_monitor.cpp:234Bug:
POSIX
sleep()from<unistd.h>has the following signature:This leads to an implicit truncation when a
double< 1.0 is passed tosleep():e.g.
sleep(0.5)→sleep(0)