Bagikan melalui


Observable.Timer Method (TimeSpan, TimeSpan)

Returns an observable sequence that produces a value after due time has elapsed and then after each period.

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
Public Shared Function Timer ( _
    dueTime As TimeSpan, _
    period As TimeSpan _
) As IObservable(Of Long)
'Usage
Dim dueTime As TimeSpan
Dim period As TimeSpan
Dim returnValue As IObservable(Of Long)

returnValue = Observable.Timer(dueTime, _
    period)
public static IObservable<long> Timer(
    TimeSpan dueTime,
    TimeSpan period
)
public:
static IObservable<long long>^ Timer(
    TimeSpan dueTime, 
    TimeSpan period
)
static member Timer : 
        dueTime:TimeSpan * 
        period:TimeSpan -> IObservable<int64> 
public static function Timer(
    dueTime : TimeSpan, 
    period : TimeSpan
) : IObservable<long>

Parameters

  • dueTime
    Type: System.TimeSpan
    The relative time at which to produce the first value.

Return Value

Type: System.IObservable<Int64>
An observable sequence that produces a value after due time has elapsed and then after each period.

See Also

Reference

Observable Class

Timer Overload

System.Reactive.Linq Namespace