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-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
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