休眠到指定时分秒
private int GetSleepTime(int hour, int min, int second){ var now = DateTime.Now; int sleep = (((hour - now.Hour) * 60 + (min - now.Minute)) * 60 + (second - now.Second)) * 1000; if (sleep < 0){ sleep += 24 * 3600 * 1000; } return sleep; }
专注 + 保持追求精益求精的精神 + 完美的心态 == 天才