naptime: Safe sleep function

Description Usage Arguments Details Value Examples

Description

Acceptable inputs:

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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

1
2
3
4
5
## Not run: 
naptime(1)
naptime(difftime("2016-01-01 00:00:01", "2016-01-01 00:00:00"))

## End(Not run)

russellpierce/naptime documentation built on Nov. 23, 2018, 12:24 a.m.