public/javascripts/yui/profiler/profiler.js
function(name){
            var now = new Date(),
                stopwatch = stopwatches[name];
                
            if (stopwatch){
                if (stopwatch.state == WATCH_STARTED){
                    saveDataPoint(name, stopwatch.total + (now - stopwatch.start));                    
                } else if (stopwatch.state == WATCH_PAUSED){
                    saveDataPoint(name, stopwatch.total);
                }
                
                //reset stopwatch information
                stopwatch.start = 0;
                stopwatch.total = 0;
                stopwatch.state = WATCH_STOPPED;                
            }
        }
function(name){
            var now = new Date(),
                stopwatch = stopwatches[name];
                
            if (stopwatch){
                if (stopwatch.state == WATCH_STARTED){
                    saveDataPoint(name, stopwatch.total + (now - stopwatch.start));                    
                } else if (stopwatch.state == WATCH_PAUSED){
                    saveDataPoint(name, stopwatch.total);
                }
                
                //reset stopwatch information
                stopwatch.start = 0;
                stopwatch.total = 0;
                stopwatch.state = WATCH_STOPPED;                
            }
        }
function ( name ) { var now = new Date ( ) , stopwatch = stopwatches [ name ] ; if ( stopwatch ) { if ( stopwatch . state == WATCH_STARTED ) { saveDataPoint ( name , stopwatch . total + ( now - stopwatch . start ) ) ; } else if ( stopwatch . state == WATCH_PAUSED ) { saveDataPoint ( name , stopwatch . total ) ; } //reset stopwatch information stopwatch . start = 0 ; stopwatch . total = 0 ; stopwatch . state = WATCH_STOPPED ; } }
Stops profiling information for a given name.
@param {String} name The name of the data point.
@return {Void}
@method stop
@static
Stops profiling information for a given name .