No commit activity in last 3 years
No release in over 3 years
If you want to compute the same user's online time from server log, who comes from multiple clients, so you need to remove duplicate parts.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Cross Time calculation Build Status

If you want to compute the same user's online time from server log, who comes from multiple clients, so you need to remove duplicate parts.

Installation

gem install cross_time_calculation

Usage

require 'time'
require 'cross_time_calculation'

@t1 = DateTime.parse("20130512").to_time
@t2 = @t1 + 33
@ctc = CrossTimeCalculation.new
@ctc.add @t1, @t2

@ctc.total_seconds # => 33

See more complicated example in unit test