Index: trunk/tools/czartool/MySQLDb.pm
===================================================================
--- trunk/tools/czartool/MySQLDb.pm	(revision 31887)
+++ trunk/tools/czartool/MySQLDb.pm	(revision 31888)
@@ -99,4 +99,20 @@
 ###########################################################################
 #
+# Takes two times, time1 and time2 and finds the middle point
+#
+###########################################################################
+sub getMiddleTime {
+    my ($self, $time1, $time2) = @_;
+
+      my $query = $self->{_db}->prepare(<<SQL);
+         SELECT '$time1' + INTERVAL (TIME_TO_SEC(TIMEDIFF('$time2', '$time1')) / 2) SECOND; 
+SQL
+    $query->execute;
+
+return scalar $query->fetchrow_array();
+}
+
+###########################################################################
+#
 # Adds the provided interval to the provided time
 #
