I'm following the documentation and other SO posts, but I'm getting the error:
No overload for
RecordKeeper
matches delegateElapsedEventHandler
for the following code.
...
System.Timers.Timer aTimer = new System.Timers.Timer();
aTimer.Elapsed += Server.RecordKeeper;
aTimer.Interval = 5000;
aTimer.Enabled = true;
...
public void RecordKeeper(object sender, ElapsedEventHandler e)
{
for (int x = 0; x < record_list.Count; x++)
{
record_list[x].TTL = record_list[x].TTL.Add(TimeSpan.FromSeconds(1));
Console.WriteLine(record_list[x].TTL.ToString());
if (record_list[x].TTL > TimeSpan.FromSeconds(70))
{
RemoveRecord(x);
}
}
}
I seem to be doing this exactly as other examples found in This post.
Thanks in advance for any help.