now: now

View source: R/now.R

nowR Documentation

now

Description

Returns a time stamp based on the current time. now calls basically gsub('.', '', sprintf('%.20f', as.numeric(Sys.time())), fixed=TRUE). To ensure that at each call a different time stamp is delivered now may call gsub(...) several times until two different results are delivered. The last one is then returned.

Usage

now(last = 35)

Arguments

last

integer: how many digits should be returned (default: 35)

Value

a character

Examples

now()   # returns all digits
now(3)  # returns only the first three digits

sigbertklinke/exams2moodle documentation built on July 6, 2023, 3:26 p.m.