<?php

/**
 *
 * INDEXU
 * Copyright(C), Nicecoder, 2000-2006, All Rights Reserved.
 *
 * INDEXU(tm) is protected by Indonesia and International copyright laws.
 * Unauthorized use or distribution of INDEXU(tm) is strictly prohibited,
 * violators will be prosecuted. To obtain a license for using INDEXU(tm),
 * please register at Nicecoder home page at http://www.nicecoder.com
 *
 * Author:
 *    Dody Rachmat Wicaksono (dody@nicecoder.com)
 *    M. Zuber (zubby@nicecoder.com)
 *
 */

function filter_runtime($type = "pre", $file = "") {
  global $dbConn, $base_path, $indexu_runtime;
  
  if ($type == 'pre') {
    list($usec, $sec) = explode(" ", microtime());
    $indexu_runtime = ((float)$usec + (float)$sec);
  }

  if ($type == 'post') {
    list($usec, $sec) = explode(" ", microtime());
    $indexu_runtime = ((float)$usec + (float)$sec) - $indexu_runtime;
    $indexu_runtime = sprintf('%.5f', $indexu_runtime);
    echo "\n<br /><div align='center'><font face='tahoma, sanserif' size='1'>Page generated in $indexu_runtime seconds with " . $dbConn->CountQuery() . " queries</font></div><br />";
  }
}

?>
