我使用下面的代码,因为它只能与大于1的int
值一起使用。如何将毫秒延迟添加到我的TimeSpan?
有没有人有想法可以用millisecond
价值甚至毫不拖延地改变它?或任何其他替代方法?
DispatcherTimer timer = new DispatcherTimer();
timer.Interval = new TimeSpan(0, 0, 0);
timer.Tick += delegate
{
timer.Stop();
// my image code generator
timer.Start();
};
timer.Start();
即使你解决您的设置时间的问题,我不知道任何计时器的那分辨率低于15毫秒。你可能需要重新考虑你的架构。 –
我认为你正在寻找'while(true){...}'大声笑 – cgTag
@ProgrammerDan这是一个C#问题,而不是java问题。 –