Changeset 874 for trunk/Modules/TimeMeasure/Measure.php
- Timestamp:
- Apr 6, 2020, 11:56:19 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/TimeMeasure/Measure.php
r873 r874 25 25 function TimeSegment($Base, $Level) 26 26 { 27 return (pow($this->LevelReducing, $Level) * $Base);27 return pow($this->LevelReducing, $Level) * $Base; 28 28 } 29 29 30 30 function StatTableName($Level) 31 31 { 32 if ($Level == 0) return ('Data');33 else return ('DataCache');32 if ($Level == 0) return 'Data'; 33 else return 'DataCache'; 34 34 } 35 35 36 36 function AlignTime($Time, $TimeSegment) 37 37 { 38 return (round(($Time - $this->ReferenceTime) / $TimeSegment) * $TimeSegment + $this->ReferenceTime);38 return round(($Time - $this->ReferenceTime) / $TimeSegment) * $TimeSegment + $this->ReferenceTime; 39 39 } 40 40 … … 124 124 { 125 125 $Y = ($Y2 - $Y1) / ($X2 - $X1) * ($X - $X1) + $Y1; 126 return ($Y);126 return $Y; 127 127 } 128 128 … … 203 203 $NewValue['Avg'] = $NewValue['Avg'] / ($RightTime - $LeftTime); 204 204 } 205 return ($NewValue);205 return $NewValue; 206 206 } 207 207 … … 228 228 echo('AbsoluteRightTime: '.$AbsoluteRightTime.'('.TimeToMysqlDateTime($AbsoluteRightTime).')<br>'); 229 229 } 230 return (array('Left' => $AbsoluteLeftTime, 'Right' => $AbsoluteRightTime));230 return array('Left' => $AbsoluteLeftTime, 'Right' => $AbsoluteRightTime); 231 231 } 232 232 … … 239 239 $Row = $DbResult->fetch_assoc(); 240 240 $Row['Time'] = MysqlDateTimeToTime($Row['Time']); 241 return (array($Row));241 return array($Row); 242 242 } else 243 243 { … … 253 253 } 254 254 // if ($Debug) print_r($Result); 255 return ($Result);255 return $Result; 256 256 } 257 257 } … … 266 266 $Row = $DbResult->fetch_assoc(); 267 267 $Row['Time'] = MysqlDateTimeToTime($Row['Time']); 268 return (array($Row));268 return array($Row); 269 269 } else 270 270 { … … 280 280 array_push($Result, array('Time' => (MysqlDateTimeToTime($Row['Time']) - 10), 'Min' => 0, 'Avg' => 0, 'Max' => 0, 'Continuity' => 0)); 281 281 } 282 return ($Result);282 return $Result; 283 283 } 284 284 } … … 338 338 if ($this->Debug) print_r($Points); 339 339 } else $Points[] = array('Min' => 0, 'Avg' => 0, 'Max' => 0); 340 return ($Points);340 return $Points; 341 341 } 342 342
Note:
See TracChangeset
for help on using the changeset viewer.