From 2eff293be90842b1b9b2c380d63829d712b3a53e Mon Sep 17 00:00:00 2001 From: asayre Date: Wed, 4 Jan 2012 08:45:24 +0000 Subject: [PATCH] Convenience methods for Timer.DelayCall( callback[,..] ) equivalent to calling a Timer.DelayCall( TimeSpan.Zero, callback[,..] ) --- Server/Timer.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Server/Timer.cs b/Server/Timer.cs index ae2d97c4a..dacfcd871 100644 --- a/Server/Timer.cs +++ b/Server/Timer.cs @@ -465,6 +465,11 @@ namespace Server #region DelayCall(..) + public static Timer DelayCall( TimerCallback callback ) + { + return DelayCall( TimeSpan.Zero, TimeSpan.Zero, 1, callback ); + } + public static Timer DelayCall( TimeSpan delay, TimerCallback callback ) { return DelayCall( delay, TimeSpan.Zero, 1, callback ); @@ -489,6 +494,11 @@ namespace Server return t; } + public static Timer DelayCall( TimerStateCallback callback, object state ) + { + return DelayCall( TimeSpan.Zero, TimeSpan.Zero, 1, callback, state ); + } + public static Timer DelayCall( TimeSpan delay, TimerStateCallback callback, object state ) { return DelayCall( delay, TimeSpan.Zero, 1, callback, state ); @@ -515,6 +525,11 @@ namespace Server #endregion #region DelayCall(..) + public static Timer DelayCall( TimerStateCallback callback, T state ) + { + return DelayCall( TimeSpan.Zero, TimeSpan.Zero, 1, callback, state ); + } + public static Timer DelayCall( TimeSpan delay, TimerStateCallback callback, T state ) { return DelayCall( delay, TimeSpan.Zero, 1, callback, state );