class Cucumber::Core::Test::Timer

def duration

def duration
  nsec
end

def nsec

def nsec
  time_in_nanoseconds - @start_time
end

def sec

def sec
  nsec / 10 ** 9.0
end

def start

def start
  @start_time = time_in_nanoseconds
  self
end

def time_in_nanoseconds

def time_in_nanoseconds
  t = Time.now
  t.to_i * 10 ** 9 + t.nsec
end