Files
Umbraco-CMS/umbraco/presentation/umbraco/timerModule.cs
Shandem f6d0d043b5 DO NOT DOWNLOAD. DOWNLOAT LATEST STABLE FROM RELEASE TAB
Created 4.1.0 branch

[TFS Changeset #55082]
2009-06-19 07:39:16 +00:00

40 lines
691 B
C#

using System.Data;
using System.Threading;
using System.Web;
using umbraco.BusinessLogic;
namespace umbraco
{
/// <summary>
/// Summary description for timerModule.
/// </summary>
public class timerModule : IHttpModule
{
protected Timer t;
#region IHttpModule Members
public void Init(HttpApplication context)
{
Log.Add((LogTypes)(-1), -1, "timer init");
t = new Timer(new TimerCallback(this.doStuff), context.Context, 1000, 1000);
}
private void doStuff(object sender)
{
Log.Add((LogTypes)(-1), -1, "timer ping");
}
public void Dispose()
{
if(t != null)
t.Dispose();
t = null;
}
#endregion
}
}