Strange behaviour when printing execution time using Sys.time()

后端 未结 0 1541
陌清茗
陌清茗 2021-01-06 22:44

I have the sample code below:

f <- function(x) {
  v = 0
  start = Sys.time()
  for (i in 1:x) {
    v = v + 1
  }
  end = Sys.time()
  print(end-start)
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题