delay <- function() { if (identical(Sys.getenv("IN_TARGETS"), "true")) { Sys.sleep(runif(1, 0, 2)) } }