Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby measure time

starting = Process.clock_gettime(Process::CLOCK_MONOTONIC)

# time consuming operation(s)

ending = Process.clock_gettime(Process::CLOCK_MONOTONIC)
elapsed = ending - starting
elapsed # => 9.424242424242424 seconds
 
PREVIOUS NEXT
Tagged: #ruby #measure #time
ADD COMMENT
Topic
Name
8+9 =