Show / Hide Table of Contents

Class Time

The Time class provides all time information. Time is a staticton (a singleton with an additional static interface).

Inheritance
System.Object
Time
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Engine.Core
Assembly: Fusee.Engine.Core.dll
Syntax
public class Time : IDisposable
Remarks

Use the input instance in cases where you actually need an object to pass around (although there is no such use case in FUSEE code at all). Use the static access in all other cases to reduce typing Input.Instance over and over again. Use

using static Fusee.Engine.Core.Time
to directly access FramesPerSecond, DeltaTime etc. without even typing a namespace or class name.

Properties

DeltaTime

Provides the DeltaTime, for the RenderAFrame() loop, since the last frame in seconds that is effected by the TimeScale (read only).

Declaration
public static float DeltaTime { get; }
Property Value
Type Description
System.Single

DeltaTimeUpdate

Provides the DeltaTime, for the Update() loop, since the last frame in seconds that is not effected by the TimeScale (read only).

Declaration
public static float DeltaTimeUpdate { get; }
Property Value
Type Description
System.Single

Frames

Provides the total number of rendered frames (read only).

Declaration
public static long Frames { get; }
Property Value
Type Description
System.Int64

FramesPerSecond

Provides the peek framerate, updated every frame (read only).

Declaration
public static float FramesPerSecond { get; }
Property Value
Type Description
System.Single

FramesPerSecondAverage

Provides the average framerate of the last second (read only).

Declaration
public static int FramesPerSecondAverage { get; }
Property Value
Type Description
System.Int32

Instance

Provides the Singleton Instance of the Time Class.

Declaration
public static Time Instance { get; }
Property Value
Type Description
Time

InstTimeScale

The TimeScale modifies the speed of the time.

Declaration
public float InstTimeScale { get; set; }
Property Value
Type Description
System.Single
Remarks

0 the time stops. 1 normal time speed. Smaller then 1 time passes slower. Bigger then 1 time passes faster.

InstTimeSinceStart

Provides the passed time since start of the application effected by TimeScale (read only).

Declaration
public float InstTimeSinceStart { get; }
Property Value
Type Description
System.Single

RealDeltaTime

Provides the DeltaTime, for the RenderAFrame() loop, since the last frame in seconds that is unaffected by the TimeScale (read only).

Declaration
public static float RealDeltaTime { get; }
Property Value
Type Description
System.Single

RealTimeSinceStart

Provides the passed time since start of the application unaffected by TimeScale (read only).

Declaration
public static float RealTimeSinceStart { get; }
Property Value
Type Description
System.Single

TimeDeltaTime

Provides the DeltaTime, for the RenderAFrame() loop, since the last frame in seconds that is effected by the TimeScale (read only).

Declaration
public float TimeDeltaTime { get; }
Property Value
Type Description
System.Single

TimeDeltaTimeUpdate

Provides the DeltaTime, for the Update() loop, since the last frame in seconds that is not effected by the TimeScale (read only).

Declaration
public float TimeDeltaTimeUpdate { get; }
Property Value
Type Description
System.Single

TimeFramePerSecond

Provides the peek framerate, updated every frame (read only).

Declaration
public float TimeFramePerSecond { get; }
Property Value
Type Description
System.Single

TimeFrames

Provides the total number of rendered frames (read only).

Declaration
public long TimeFrames { get; }
Property Value
Type Description
System.Int64

TimeFramesPerSecondAverage

Provides the average framerate of the last second (read only).

Declaration
public int TimeFramesPerSecondAverage { get; }
Property Value
Type Description
System.Int32

TimeRealDeltaTime

Provides the DeltaTime, for the RenderAFrame() loop, since the last frame in seconds that is unaffected by the TimeScale (read only).

Declaration
public float TimeRealDeltaTime { get; }
Property Value
Type Description
System.Single

TimeRealTimeSinceStart

Provides the passed time since start of the application unaffected by TimeScale (read only).

Declaration
public float TimeRealTimeSinceStart { get; }
Property Value
Type Description
System.Single

TimeScale

The TimeScale modifies the speed of the time.

Declaration
public static float TimeScale { get; set; }
Property Value
Type Description
System.Single
Remarks

0 the time stops. 1 normal time speed. Smaller then 1 time passes slower. Bigger then 1 time passes faster.

TimeSinceStart

Provides the passed time since start of the application effected by TimeScale (read only).

Declaration
public static float TimeSinceStart { get; }
Property Value
Type Description
System.Single

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

Dispose(Boolean)

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

Finalize()

Finalizers (historically referred to as destructors) are used to perform any necessary final clean-up when a class instance is being collected by the garbage collector.

Declaration
protected void Finalize()

Implements

System.IDisposable
Generated by DocFX
GitHub Repo
Back to top