By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,421 Members | 1,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,421 IT Pros & Developers. It's quick & easy.

Waitable timer?

P: n/a
hi all,

I want to create a waitable timer in C#. How do I do it? There is
Timer class and there is the WaitHandle class with WaitAny... methods.
But they dont seem to help. Basically iam looking for the C# version
of platform SDK's SetWaitableTimer

Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
"Jackson Davis [MSFT]" <an*******> wrote in message news:<B8**********************************@microso>...
Take a look at System.Threading.Timer and System.Threading.TimerCallback. TimerCallback executes on a threadpool
thread seperate from the thread that created the timer so you should
be able to use an AutoResetEvent or mutex to simulate a waitable
timer. That is, create the timer in one thread and block on a
synchronization object. In the timercallback, signal the sync object.
The example on MSDN at

Hope that helps

Jackson Davis [MSFT]

Thank you. Your comments helped.

- Dinesh
Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.