You can try the following piece of code to do so:
speedtest <- function(a)
{
p1 <- proc.time()
Sys.sleep(a)
proc.time() - p1 # The cpu usage should be negligible
}
speedtest(4.8)
You can check the info on Sys.sleep by typing ?Sys.sleep on your console.