示例#1
0
		public void begin(int timeout)
		{
			lock (this)
			{
				if (terminated)
					throw new InvalidOperationException("Timer already terminated");
				callingThread = WorkerThread.CurrentThread();
				deadline = now() + timeout;
				notifyAll();
			}
		}
示例#2
0
		public AlarmState()
		{
			callingThread = WorkerThread.CurrentThread();
		}