static void Main(string[] args)
{
Thread th = new Thread(new ThreadStart(tt.st));
th.Start();
th.Join();
}
}
class tt {
public static void st()
{
while(true){
DateTime dt = new DateTime();
dt = DateTime.Parse("15:15");
int k = (dt.Hour - DateTime.Now.Hour)*60*60*1000 +(dt.Minute -
DateTime.Now.Minute)*60*1000+1000;
Thread.Sleep(k);
if (dt.Hour==DateTime.Now.Hour && dt.Minute==DateTime.Now.Minute)
{
Console.WriteLine("起床了!!!");
}
}
}
}