Sys.sleep returns immediately for arguments larger than 2.2e6 or so,
including for Inf.  This does conforms to the letter of the documention:
"There is no guarantee that the process will sleep for the whole of the
specified interval." but an error would be more helpful.

Since Sys.sleep ignores class and only looks at type, it also returns
immediately for objects whose underlying representation is a large number,
e.g. as.POSIXct('2010-01-01').
Since Sys.sleep ignores class and only looks at type, it sleeps for the
as.numeric equivalent of things like as.Date('2010-01-01') and factor('x'),
which is not terribly helpful.

The documentation doesn't specify the class or type of the argument, only
that it is "in seconds", but again I'd suggest it would be more helpful if
it insisted on a numeric class and give an error otherwise.

              -s

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to