public void SleepTo(Int64 nexttime) { // Use class member such that the method can be interrupted by others m_ullSchedTime = nexttime; Int64 t; rdtsc(out t); while (t < m_ullSchedTime) { m_TickCond.WaitOne(1); rdtsc(out t); } }