Learn R Programming

nanonext (version 1.3.0)

msleep: Sleep Utility

Description

Sleep function. May block for longer than requested, with the actual wait time determined by the capabilities of the underlying system.

Usage

msleep(time)

Value

Invisible NULL.

Arguments

time

integer number of milliseconds to block the caller.

Details

Non-integer values for ‘time’ are coerced to integer. Negative, logical and other non-numeric values are ignored, causing the function to return immediately.

Note that unlike Sys.sleep, this function is not user-interruptible by sending SIGINT e.g. with ctrl + c.

Examples

Run this code
time <- mclock(); msleep(100); mclock() - time

Run the code above in your browser using DataLab