Urho.Time Class

%Time and frame counter subsystem.

See Also: Time

Syntax

public class Time : UrhoObject

Requirements

Namespace: Urho
Assembly: Urho (in Urho.dll)
Assembly Versions: 1.0.0.0

The members of Urho.Time are listed below.

See Also: UrhoObject

Public Constructors

Constructs a new instance of Urho.Time which is tied to the Application.CurrentContext.
Constructs a new instance of Urho.Time, given a raw pointer to an unmanaged object
Constructs a new instance of Urho.Time linked to a specific Context.

Protected Constructors

Empty constructor, chain to this constructor when you provide your own constructor that sets the handle field.

Public Properties

[read-only]
ElapsedTimeSingle. Return elapsed time from program start as seconds.
[read-only]
FrameNumberUInt32. Return frame number, starting from 1 once BeginFrame() is called for the first time.
[read-only]
static
SystemTimeUInt32. Get system time as milliseconds.
TimerPeriodUInt32. Return current low-resolution timer period in milliseconds. Or Set the low-resolution timer period in milliseconds. 0 resets to the default period.
[read-only]
static
TimeSinceEpochUInt32. Get system time as seconds since 1.1.1970.
[read-only]
static
TimeStampString. Get a date/time stamp as a string.
[read-only]
TimeStepSingle. Return current frame timestep as seconds.
[read-only]
override
TypeStringHash. Urho's type system type.
[read-only]
override
TypeNameString. Urho's low-level type name.
[read-only]
static
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
[read-only]
static
TypeStaticStringHash. Urho's low-level type, accessible as a static method.

Public Methods

BeginFrame(Single)
Begin new frame, with (last) frame duration in seconds and send frame start event.
EndFrame()
End frame. Increment total time and send frame end event.
static
Sleep(UInt32)
Sleep for a number of milliseconds.
SubscribeToFrameEnded(Action<FrameEndedEventArgs>) : Subscription
Subscribes to the FrameEnded event raised by the Time.
SubscribeToFrameStarted(Action<FrameStartedEventArgs>) : Subscription
Subscribes to the FrameStarted event raised by the Time.

Public Events

FrameEndedEnd frame event, invoked from the Time.EndFrame method.
FrameStartedSignals the beginning of the new frame.