From: "charliesome (Charlie Somerville)" Date: 2013-07-17T04:04:42+09:00 Subject: [ruby-core:56050] [CommonRuby - Feature #8640] Add Time#elapsed to return nanoseconds since creation Issue #8640 has been updated by charliesome (Charlie Somerville). I'll echo what everyone else has said above by saying that I'm strongly against #elapsed returning nanoseconds. I'm happy with #elapsed_nanoseconds returning nanoseconds as an Integer, and #elapsed returning seconds as a Float though. ---------------------------------------- Feature #8640: Add Time#elapsed to return nanoseconds since creation https://bugs.ruby-lang.org/issues/8640#change-40536 Author: tenderlovemaking (Aaron Patterson) Status: Open Priority: Normal Assignee: Category: Target version: Hi, We time many things in Rails (and so does lots of other code), and I've found that we spend lots of time allocating and subtracting time objects. For example: start = Time.now ## do stuff we want to time finish = Time.now - start It would be nice if we could just create one time object and grab the nanoseconds elapsed since the time object was created like so: start = Time.now ## do stuff we want to time finished = start.elapsed # => nanoseconds elapsed. I've attached a patch that implements this feature. -- http://bugs.ruby-lang.org/