BASS.NET API for the Un4seen BASS Audio LibraryBASSTimer ClassBASS.NET API for the Un4seen BASS Audio Library
Implements a secure Timer, which raises an event in defined intervals.
Inheritance Hierarchy

SystemObject
  Un4seen.BassBASSTimer

Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public sealed class BASSTimer

The BASSTimer type exposes the following members.

Constructors

  NameDescription
Public methodBASSTimer
Creates a new Timer instance using a default interval of 50ms.
Public methodBASSTimer(Int32)
Creates a new Timer instance using the given interval.
Top
Properties

  NameDescription
Public propertyEnabled
Gets or Sets if the Timer is currently active.
Public propertyInterval
Gets or Sets the number of milliseconds between two Tick events.
Top
Methods

  NameDescription
Public methodDispose
Implement IDisposable.
Protected methodFinalize
Finalization code.
(Overrides ObjectFinalize.)
Public methodStart
Activates (starts) the Timer.
Public methodStop
Deativates (stops) the Timer.
Top
Events

  NameDescription
Public eventTick
Event handler used to notify that the timer has elapsed.
Top
Remarks

This timer implementation is based on the Timer, but is optimized to be used in multi-threading environments as well as UI threads.

This Timer uses a Tick event handler which will be raised every Interval milliseconds once the Start method was called and the timer is activated.

This implementation ensures, that the Tick event will be executed in the main thread the subscriber executes in! So when subscribing to this event from a UI thread, the specified event delegate will also be called in that UI thread.

Use the Stop method to deactivate the Timer.

You might change the Interval at any time. If the Timer has already been activated, this will also take immediate effect (the next Tick event will be raised after the new interval value).

See Also

Reference