Click or drag to resize

TimerServiceExtensionsStart Method

Starts a timer with the specified interval. The specified method will be invoked on the specified target each timer tick.

Namespace:  SampSharp.Entities
Assembly:  SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-local+709673996c0cc3c0733358a87691d1009326afa7
Syntax
C#
public static TimerReference Start(
	this ITimerService timerService,
	Object target,
	MethodInfo method,
	TimeSpan interval
)

Parameters

timerService
Type: SampSharp.EntitiesITimerService
The timer service.
target
Type: SystemObject
The target on which to tick.
method
Type: System.ReflectionMethodInfo
The method to invoke each timer tick.
interval
Type: SystemTimeSpan
The interval at which to tick.

Return Value

Type: TimerReference
A reference to the started timer.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ITimerService. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also