Class Timer

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.dll

    Mechanism to issue simple periodic or one-shot events.
    Timer is provided for application developers to be able to issue simple periodic or one-shot events. Please note that the timer callback functions should return as soon as possible because they block the next SignalTick. Please note that timer signals are not in sync with DALi's render timer.
    This class is a handle class so it can be stack allocated and used as a member.

    public class Timer : BaseHandle, INotifyPropertyChanged, IDisposable
    Inheritance
    object
    BindableObject
    Tizen.NUI.Binding.Element
    BaseHandle
    Timer
    Implements
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable

    Constructors

    View Source

    Timer(uint)

    Creates a tick timer that emits periodic signal.

    Declaration
    public Timer(uint milliSec)
    Parameters
    Type Name Description
    uint milliSec

    Interval in milliseconds.

    Properties

    View Source

    Interval

    Gets/Sets the interval of the timer.

    Declaration
    public uint Interval { get; set; }
    Property Value
    Type Description
    uint
    Remarks

    For setter, this sets a new interval on the timer and starts the timer.
    Cancels the previous timer.

    Methods

    View Source

    Dispose(DisposeTypes)

    Dispose. Releases unmanaged and optionally managed resources.

    Declaration
    protected override void Dispose(DisposeTypes type)
    Parameters
    Type Name Description
    DisposeTypes type

    Explicit to release both managed and unmanaged resources. Implicit to release only unmanaged resources.

    Overrides
    BaseHandle.Dispose(DisposeTypes)
    Remarks

    When overriding this method, you need to distinguish between explicit and implicit conditions. For explicit conditions, release both managed and unmanaged resources. For implicit conditions, only release unmanaged resources.

    View Source

    ~Timer()

    Destructor.

    Declaration
    protected ~Timer()
    View Source

    IsRunning()

    Tells whether the timer is running.

    Declaration
    public bool IsRunning()
    Returns
    Type Description
    bool

    Whether the timer is started or not.

    View Source

    Start()

    Starts the timer.
    In case a timer is already running, its time is reset and the timer is restarted.

    Declaration
    public void Start()
    View Source

    Stop()

    Stops the timer.

    Declaration
    public void Stop()

    Events

    View Source

    Tick

    @brief Event for the ticked signal, which can be used to subscribe or unsubscribe the event handler provided by the user. The ticked signal is emitted after specified time interval.

    Declaration
    public event EventHandlerWithReturnType<object, Timer.TickEventArgs, bool> Tick
    Event Type
    Type Description
    EventHandlerWithReturnType<object, Timer.TickEventArgs, bool>

    Implements

    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX