![ContractedBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![ExpandedBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
using System;
using System.Collections.Generic;
using System.Text;
using System.Timers;
namespace Domcoool.Directory.SynchronousServer
{
class Program
{
static void Main(string[] args)
{
timer = new System.Timers.Timer(10000);
timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
timer.AutoReset = true;
timer.Enabled = true;
timer.Start();
Console.ReadLine();
}
static void timer_Elapsed(object sender, ElapsedEventArgs e)
{
if (DateTime.Now.Hour==2)
{
//TODO
![](https://www.cnblogs.com/Images/dot.gif)
}
}
private static Timer timer;
}
}