/**
  * Returns the total time the queries took to execute.
  *
  * You can use the constants in the Profiler class to specify
  * what kind of queries you want to get, e.g. Profiler::INSERT.
  *
  * @param  integer $mode
  * @return float|integer
  */
 public function getQueryTime($mode = null)
 {
     $time = 0;
     foreach ($this->profiler->getQueryProfiles($mode) as $query) {
         $time += $query->getElapsedTime();
     }
     return $time;
 }