in reply to Re: Re: Time diff
in thread Time diff

The module would work for finding an average time, like this:
use strict; use DateTime::Precise; my $t1 = DateTime::Precise->new('2003. 3.26 16:14:13.8167'); my $t2 = DateTime::Precise->new('2003. 3.26 16:23:14.6152'); my $average = $t1 + ($t2 - $t1)/2.0;
The subtraction produces a time in seconds, and the module provides a way to add seconds to a time. So just add half the difference and you will have the average.