diff --git a/base/libc.jl b/base/libc.jl index e78b5a1d13c92..1ffe8a92aabfb 100644 --- a/base/libc.jl +++ b/base/libc.jl @@ -122,6 +122,16 @@ elseif Sys.iswindows() else error("systemsleep undefined for this OS") end +""" + systemsleep(s::Real) + +Suspends execution for `s` seconds. +This function does not yield to Julia's scheduler and therefore blocks +the Julia thread that it is running on for the duration of the sleep time. + +See also: [`sleep`](@ref) +""" +systemsleep struct TimeVal sec::Int64 diff --git a/doc/src/base/libc.md b/doc/src/base/libc.md index 65bdb3da10d28..0af1b74a79a71 100644 --- a/doc/src/base/libc.md +++ b/doc/src/base/libc.md @@ -14,4 +14,5 @@ Base.Libc.strftime Base.Libc.strptime Base.Libc.TmStruct Base.Libc.flush_cstdio +Base.Libc.systemsleep ```