sys_time: Mockable 'Sys.time()' drop in replacement

View source: R/sys_time.R

sys_timeR Documentation

Mockable Sys.time() drop in replacement

Description

Mockable Sys.time() drop in replacement

Usage

sys_time()

Value

POSIXct, matching what Sys.time() returns

See Also

sys_date()

Examples

Sys.time()
sys_time()

clock_mock()
library(timefuzz)
x <- time_fuzz$new()
x$freeze(Sys.time() + 500)
sys_time()
clock_mock(FALSE)
sys_time()

ropensci/clock documentation built on Sept. 11, 2022, 11:07 a.m.