wait_until | R Documentation |
Block the current runtime until the expression returns TRUE
.
wait_until(
expr,
envir = parent.frame(),
timeout = Inf,
interval = 0.1,
later_run_now = TRUE
)
expr |
an expression to check, supports quasiquotation. |
envir |
the environment in which the expression is to be evaluated. |
timeout |
raise an error if this amount of time in second has passed. |
interval |
delay between retries. |
later_run_now |
execute |
s <- Sys.time()
system.time(wait_until(Sys.time() - s > 1))
z <- 0
later::later(function() z <<- 1, 1)
wait_until(z == 1)
z == 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.