Learn R Programming

cwhmisc (version 2.1)

delayt: Waiting loop for program execution

Description

Wait for approximately sec seconds during program execution

Usage

delayt(sec) # wait for sec seconds
  nrof <- delayt(sec) # save the number of internal calls of Sys.time(). Can be used to compare the relative execution speed of different processors.

Arguments

sec
Number of seconds to wait

Value

  • the number of internal calls of Sys.time()

Details

calls Sys.time()

Examples

Run this code
Sys.time(); nrof <- delayt(5); Sys.time()
  print(nrof) # 2620 on my machine

Run the code above in your browser using DataLab