public/javascripts/yui/profiler/profiler.js
function(name){
            if(container[name]){
                throw new Error("Cannot use '" + name + "' for profiling through start(), name is already in use.");
            } else {
            
                //create report if necessary
                if (!report[name]){
                    createReport(name);
                }
                
                //create stopwatch object if necessary
                if (!stopwatches[name]){             
                    stopwatches[name] = {
                        state: WATCH_STOPPED,
                        start: 0,
                        total: 0
                    };
                }
                
                if (stopwatches[name].state == WATCH_STOPPED){
                    stopwatches[name].state = WATCH_STARTED;
                    stopwatches[name].start = new Date();                    
                }

            }
        }
function(name){
            if(container[name]){
                throw new Error("Cannot use '" + name + "' for profiling through start(), name is already in use.");
            } else {
            
                //create report if necessary
                if (!report[name]){
                    createReport(name);
                }
                
                //create stopwatch object if necessary
                if (!stopwatches[name]){             
                    stopwatches[name] = {
                        state: WATCH_STOPPED,
                        start: 0,
                        total: 0
                    };
                }
                
                if (stopwatches[name].state == WATCH_STOPPED){
                    stopwatches[name].state = WATCH_STARTED;
                    stopwatches[name].start = new Date();                    
                }

            }
        }
function ( name ) { if ( container [ name ] ) { throw new Error ( "Cannot use '" + name + "' for profiling through start(), name is already in use." ) ; } else { //create report if necessary if ( ! report [ name ] ) { createReport ( name ) ; } //create stopwatch object if necessary if ( ! stopwatches [ name ] ) { stopwatches [ name ] = { state : WATCH_STOPPED , start : 0 , total : 0 } ; } if ( stopwatches [ name ] . state == WATCH_STOPPED ) { stopwatches [ name ] . state = WATCH_STARTED ; stopwatches [ name ] . start = new Date ( ) ; } } }
Start profiling information for a given name. The name cannot be the name
of a registered function or object. This is used to start timing for a
particular block of code rather than instrumenting the entire function.
@param {String} name The name of the data point.
@return {Void}
@method start
@static
Start profiling information for a given name . The name cannot be the name of a registered function or object . This is used to start timing for a particular block of code rather than instrumenting the entire function .