Changeset 31888 for trunk/tools/czartool/MySQLDb.pm
- Timestamp:
- Jul 15, 2011, 4:17:14 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/tools/czartool/MySQLDb.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/czartool/MySQLDb.pm
r29750 r31888 99 99 ########################################################################### 100 100 # 101 # Takes two times, time1 and time2 and finds the middle point 102 # 103 ########################################################################### 104 sub getMiddleTime { 105 my ($self, $time1, $time2) = @_; 106 107 my $query = $self->{_db}->prepare(<<SQL); 108 SELECT '$time1' + INTERVAL (TIME_TO_SEC(TIMEDIFF('$time2', '$time1')) / 2) SECOND; 109 SQL 110 $query->execute; 111 112 return scalar $query->fetchrow_array(); 113 } 114 115 ########################################################################### 116 # 101 117 # Adds the provided interval to the provided time 102 118 #
Note:
See TracChangeset
for help on using the changeset viewer.
