Unosquare
    Show / Hide Table of Contents

    Class RealTimeClock

    A time measurement artifact.

    Inheritance
    Object
    RealTimeClock
    Implements
    IDisposable
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Swan.Diagnostics
    Syntax
    public sealed class RealTimeClock : IDisposable

    Constructors

    RealTimeClock()

    Initializes a new instance of the RealTimeClock class. The clock starts paused and at the 0 position.

    Declaration
    public RealTimeClock()

    Properties

    IsRunning

    Gets a value indicating whether the clock is running.

    Declaration
    public bool IsRunning { get; }
    Property Value
    Type Description
    Boolean

    Position

    Gets or sets the clock position.

    Declaration
    public TimeSpan Position { get; }
    Property Value
    Type Description
    TimeSpan

    SpeedRatio

    Gets or sets the speed ratio at which the clock runs.

    Declaration
    public double SpeedRatio { get; set; }
    Property Value
    Type Description
    Double

    Methods

    Dispose()

    Declaration
    public void Dispose()

    Pause()

    Pauses the clock.

    Declaration
    public void Pause()

    Play()

    Starts or resumes the clock.

    Declaration
    public void Play()

    Reset()

    Sets the clock position to 0 and stops it. The speed ratio is not modified.

    Declaration
    public void Reset()

    Update(TimeSpan)

    Sets a new position value atomically.

    Declaration
    public void Update(TimeSpan value)
    Parameters
    Type Name Description
    TimeSpan value

    The new value that the position property will hold.

    Implements

    System.IDisposable

    Comments

    Back to top Copyright © 2017-2019 Unosquare