Ejemplo n.º 1
0
        public static void Sleep(int timeoutMilliseconds)
        {
            Debug.Assert(timeoutMilliseconds >= -1);

            ThreadWaitInfo waitInfo = RuntimeThread.CurrentThread.WaitInfo;

            if (waitInfo.CheckAndResetPendingInterrupt)
            {
                throw new ThreadInterruptedException();
            }

            waitInfo.Sleep(timeoutMilliseconds);
        }
Ejemplo n.º 2
0
 public static void Sleep(int timeoutMilliseconds, bool interruptible = true)
 {
     ThreadWaitInfo.Sleep(timeoutMilliseconds, interruptible);
 }