R/download_time.R

Defines functions fedstat_time_expired fedstat_elapsed

# Monotonic elapsed time includes HTTP waits and is unaffected by clock changes.
fedstat_elapsed <- function() proc.time()[["elapsed"]]

fedstat_time_expired <- function(seconds, waiting = FALSE) {
    fedstat_error(paste0(
        if (waiting) "The next required pause exceeds the remaining time allowance" else "Download time limit reached",
        " (", seconds, " s per run)."
    ), "time_limit", "schedule")
}

Try the fedstatAPIr package in your browser

Any scripts or data that you put into this service are public.

fedstatAPIr documentation built on Nov. 4, 2026, 9:07 a.m.