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.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;
In reply to Re^3: Time diff
by tall_man
in thread Time diff
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |