TimeSpan nowTime = new TimeSpan(DateTime.Now.Ticks); TimeSpan nextTime = new TimeSpan(nextDispatchert.RegBeginTime.Ticks); TimeSpan gapTime = nowTime.Subtract(nextTime).Duration();
通过 gapTime 可以获取分钟,小时,秒,天