私があなたの要求を理解した場合、次のようなことができるタイマーに毎秒時間をチェックさせるのは少し無駄に思えます:
void Main()
{
//If the calling context is important (for example in GUI applications)
//you'd might want to save the Synchronization Context
//for example: context = SynchronizationContext.Current
//and use if in the lambda below e.g. s => context.Post(s => this.Close(), null)
var timer = new System.Threading.Timer(
s => this.Close(), null, CalcMsToHour(23, 00, 00), Timeout.Infinite);
}
int CalcMsToHour(int hour, int minute, int second)
{
var now = DateTime.Now;
var due = new DateTime(now.Year, now.Month, now.Day, hour, minute, second);
if (now > due)
due.AddDays(1);
var ms = (due - now).TotalMilliseconds;
return (int)ms;
}