powered by
Helper that automatically brackets an expression with nosleep_on() and nosleep_off().
nosleep_on()
nosleep_off()
with_nosleep(expr, keep_display = FALSE)
The result of evaluating expr.
expr
Expression to execute while nosleep is on.
logical. If TRUE, also prevent the display from sleeping.
if (FALSE) { with_nosleep({ message("Downloading a large file…") download_large_file() }) }
Run the code above in your browser using DataLab