# Mojo.Timing

## Namespace Detail

## Method Summary

- Mojo.Timing.createTimingString(prefix, label)
- Mojo.Timing.get(category)
- Mojo.Timing.getCategoriesWithPrefix(prefix)
- Mojo.Timing.pause(category)
- Mojo.Timing.PerfTimer(label)
- Mojo.Timing.reportSceneTiming(sceneName, sceneWindow)
- Mojo.Timing.reportTiming(prefix, label)
- Mojo.Timing.reset(category)
- Mojo.Timing.resetAll()
- Mojo.Timing.resetAllWithPrefix(prefix)
- Mojo.Timing.resetSceneTiming(sceneWindow)
- Mojo.Timing.resume(category)

## Method Detail

### Mojo.Timing.createTimingString(prefix, label)

Reports (with Mojo.Log.info) all the timings for a particular category prefix.

#### Parameters

- {String} prefix - Prefix to define which timings to show
- {String} label - Label shown in the timing output

### {Mojo.Timing.PerfTimer} Mojo.Timing.get(category)

Gets a performance timer for a particular category, creating it if needed.

#### Parameters

- {String} category - Category of the timer

#### Returns

Performance timer for the category, or the null timer if timing is disabled.

### {Array} Mojo.Timing.getCategoriesWithPrefix(prefix)

Returns a list of category strings with a common prefix.

#### Parameters

- {String} prefix - the common prefix

#### Returns

Array of matching categories

### Mojo.Timing.pause(category)

Pauses timing for a particular category.

#### Parameters

- {String} category - category name

### Mojo.Timing.PerfTimer(label)

Creates a reset performance timer with a particular label.

#### Parameters

- {String} label - Label used to identfy the timer, also used as the property name when added to the perfTimer's object.

### Mojo.Timing.reportSceneTiming(sceneName, sceneWindow)

Reports timings for scene push/pop operations, labeled with prefix `'scene#'`.

#### Parameters

- sceneName
- sceneWindow

### Mojo.Timing.reportTiming(prefix, label)

Reports (with Mojo.Log.info) all the timings for a particular category prefix.

#### Parameters

- {String} prefix - Prefix to define which timings to show
- {String} label - Label shown in the timing output

### Mojo.Timing.reset(category)

Reset the timings for a category.

#### Parameters

- {String} category - name of the category to reset

### Mojo.Timing.resetAll()

Resets all the performance timers.

### Mojo.Timing.resetAllWithPrefix(prefix)

Resets all the timers with a common prefix.

#### Parameters

*{String} prefix - common prefix

### Mojo.Timing.resetSceneTiming(sceneWindow)

Resets timings for scene push/pop operations.

#### Parameters

- sceneWindow

### Mojo.Timing.resume(category)

Starts or resumes timing for a particular category.

#### Parameters

- {String} category - category name