TimingData Structure

public struct TimingData

A class that holds timing info (in milliseconds). The timing info is an average of 1 or more timing samples, and can be retrieved using the GetAvgTime method.

Timing Info is calculated and managed by Chunk Streamers (all of the built in Chunk Streamers make use of this info) and the ConditionalMembers class, however only within the editor and Development Builds (for performance reasons).

Properties

Name Type Description
Samples int

The number of samples in the data. More samples means the data is more accurate.

Methods

Adds a sample to the timing data and returns a new TimingData instance that holds the data. Necessary because the TimingData is a struct, and this way you can be assured to have accurate data.

Parameters

Name Type Description
newSampleTime double

The new sample time.

Returns

TimingData
The new TimingData instance.


GetAvgTime()

public double GetAvgTime()

Gets the average sample time of the data, in milliseconds.

Returns

double
The average sample time, in milliseconds.