我正在使用System.Threading.Timer使我的当前线程等待特定的时间。我没有使用任何间隔,因为我不希望函数重复自身。我的代码的问题在于,我的计时器不适用于超过 2 秒的到期时间值。是内存问题还是代码中的某些错误。任何人都可以帮忙。谢谢。这是我的示例代码。
var timer = new System.Threading.Timer(a =>
{
//Stuff to perform after 10 seconds
}, null, 10000, 0);
守候你守候我
相关分类