Module: Duration::Time

Module | Duration::Time
In: | lib/more/facets/duration.rb

Time#duration has been added to convert the UNIX timestamp into a Duration. See Time#duration for an example.

### Methods

duration

### Public Instance methods

duration()

Create a Duration object from the UNIX timestamp.

Example

      Time.now.duration
      => #<Duration: 1898 weeks, 6 days, 1 hour, 12 minutes and 1 second>

[Source]

    # File lib/more/facets/duration.rb, line 272
        def duration
          Duration[to_i]
        end

[Validate]