Ignore:
Timestamp:
Dec 18, 2005 12:16:03 AM (18 years ago)
Author:
scdev
Message:

detabbed all files ;P

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/ScriptTimer.inc.php

    r41 r42  
    11<?php
    22/**
    3  * ScriptTimer.inc.php 
     3 * ScriptTimer.inc.php
    44 * Code by Strangecode :: www.strangecode.com :: This document contains copyrighted information
    55 */
    6  
     6
    77class ScriptTimer {
    88
     
    1010    var $_timing_start_times;
    1111    var $_timing_stop_times;
    12    
     12
    1313    function start($name='default')
    1414    {
    1515        $this->_timing_start_times[$name] = explode(' ', microtime());
    1616    }
    17    
     17
    1818    function stop($name='default')
    1919    {
    2020        $this->_timing_stop_times[$name] = explode(' ', microtime());
    2121    }
    22    
     22
    2323    function getTime($name='default')
    2424    {
     
    2626            return 0;
    2727        }
    28        
     28
    2929        if (!isset($this->_timing_stop_times[$name])) {
    3030            $stop_time = explode(' ', microtime());
     
    3232            $stop_time = $this->_timing_stop_times[$name];
    3333        }
    34        
     34
    3535        // Do the big numbers first so the small ones aren't lost.
    3636        $current = $stop_time[1] - $this->_timing_start_times[$name][1];
    3737        $current += $stop_time[0] - $this->_timing_start_times[$name][0];
    38        
     38
    3939        return sprintf($this->time_format, $current);
    4040    }
Note: See TracChangeset for help on using the changeset viewer.