You are here

private function DatabaseDataCollector::orderQueryByTime in Devel 8.2

Same name and namespace in other branches
  1. 8.3 webprofiler/src/DataCollector/DatabaseDataCollector.php \Drupal\webprofiler\DataCollector\DatabaseDataCollector::orderQueryByTime()
  2. 8 webprofiler/src/DataCollector/DatabaseDataCollector.php \Drupal\webprofiler\DataCollector\DatabaseDataCollector::orderQueryByTime()
  3. 4.x webprofiler/src/DataCollector/DatabaseDataCollector.php \Drupal\webprofiler\DataCollector\DatabaseDataCollector::orderQueryByTime()

Parameters

$a:

$b:

Return value

int

File

webprofiler/src/DataCollector/DatabaseDataCollector.php, line 255

Class

DatabaseDataCollector
Class DatabaseDataCollector

Namespace

Drupal\webprofiler\DataCollector

Code

private function orderQueryByTime($a, $b) {
  $at = $a['time'];
  $bt = $b['time'];
  if ($at == $bt) {
    return 0;
  }
  return $at < $bt ? 1 : -1;
}