naptime {naptime}R Documentation

Safe sleep function

Description

Acceptable inputs:

Usage

naptime(time, permissive = getOption("naptime.permissive",
  permissive_default))

## S4 method for signature 'numeric'
naptime(time, permissive = getOption("naptime.permissive",
  permissive_default))

## S4 method for signature 'Period'
naptime(time, permissive = getOption("naptime.permissive",
  permissive_default))

## S4 method for signature 'POSIXct'
naptime(time, permissive = getOption("naptime.permissive",
  permissive_default))

## S4 method for signature 'difftime'
naptime(time,
  permissive = getOption("naptime.permissive", permissive_default))

## S4 method for signature 'logical'
naptime(time, permissive = getOption("naptime.permissive",
  permissive_default))

## S4 method for signature ''NULL''
naptime(time, permissive = getOption("naptime.permissive",
  permissive_default))

## S4 method for signature 'character'
naptime(time,
  permissive = getOption("naptime.permissive", permissive_default))

Arguments

time

Time to sleep, polymorphic type inputs, leaning towards units as 'seconds'

permissive

An optional argument to override the naptime.permissive option for this call of the naptime function

Details

The default duration is set with a numeric for the option naptime.default_delay in seconds (default: 0.1) Whether a generic input is accepted is determined by the option naptime.permissive (default: FALSE)

Value

NULL; A side effect of a pause in program execution

Examples

## Not run: 
naptime(1)
naptime(difftime("2016-01-01 00:00:01", "2016-01-01 00:00:00"))

## End(Not run)

[Package naptime version 1.3.0 Index]