www.webOShelp.net

Get the latest on:webOS Developers' RSS FeedwebOS Facebook page webOS Twitter Feed

Home Resources API Reference Mojo.Timing.getCategoriesWithPrefix(prefix)

Mojo.Timing.getCategoriesWithPrefix(prefix)

Function to get a list of category strings with a common prefix. Returns Array of Strings.

Parameter Type Description
previx String Common category prefix.

Example usage:

    var categories = Mojo.Timing.getCategoriesWithPrefix(prefix);
    var makeOneTiming = function(category) {
        var perfTimer = Mojo.Timing.get(category);
        return category.gsub(prefix, '') + ": " + 
           perfTimer.elapsedTime + "ms (" + perfTimer.timesRecorded + ")";
    };
    var timings = categories.collect(makeOneTiming);
 

0 Comments

    Add Comment


      • >:o
      • :-[
      • :'(
      • :-(
      • :-D
      • :-*
      • :-)
      • :P
      • :\
      • 8-)
      • ;-)