![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #21 (permalink) |
| | Re: How to Make a .NET Timer Always Fire at the Right Time Hi Dick I understand what you say. But surely there's non-deterministic, and there's non-deterministic. I'm not talking about milliseconds. This is where a 10-second timer goes off after 30 seconds. I don't call that a timer. This machine isn't doing anything it isn't designed to do, and it's well within its memory and CPU capacity. The symptom, to me, is that of using the wrong kind of timer, which I'm happy to discover. I find it hard to believe that there isn't a way to get Windows to keep time to an accuracy of 200% over 10 seconds. Regards Charles "DickGrier" <dick_grierNOSPAM@newsgroup> wrote in message news:#5k9ai9WKHA.4704@newsgroup Quote: > Windows is non-deterministic. > > As other replies indicate, you simply cannot assure yourself that this > happens -- unless you design you system such that the user (or your own > code) cannot cause trouble. The most reliable way to do this is to > dedicate a processor, another computer, to the time-critical task. It you > don't allow the user, or your own code, to use that environment for > anything other than your time critical process, you should be OK. You'd > then add a non-time critical communications method to that process that > communicates results to your "loaded" machine, where you can then allow > the user -- or your own code -- do things that otherwise mung up the > system. > > Dick > > -- > Richard Grier, Consultant, Hard & Software 12962 West Louisiana Avenue > Lakewood, CO 80228 303-986-2179 (voice) Homepage: www.hardandsoftware.net > Author of Visual Basic Programmer's Guide to Serial Communications, 4th > Edition ISBN 1-890422-28-2 (391 pages) published July 2004, Revised July > 2006. |
My System Specs![]() |
| | #22 (permalink) |
| | Re: How to Make a .NET Timer Always Fire at the Right Time I don't know if is to late, to give you one idea, I did have the same problem, i did have to develop one small app, to keep a VPN tunnel up and running, until change one of the VPN pix, What i did do to kip the connection up and running was a ICMP app, using Background worker this basically ping a host from the other lan and this way my pix that was broke dint let the tunnel get down. And the BackGroundWorker don't let my CPU get stress up. Cheers, Mike "Charles" <blank@newsgroup> wrote in message news:eG3x2DvWKHA.4780@newsgroup Quote: > This is a follow up to an earlier post, about a Threading.Timer that > occasionally fired at odd times. In that case I discovered that low memory > meant that the machine 'froze' intermittently and a timer callback could > fire after 30 seconds instead of every 10 seconds as intended. > > I now find that if the machine becomes preoccupied with another task, I > get the same effect. This is a very bad state of affairs, as I can no > longer rely on my 10 second tick occurring every 10 seconds. > > I need to have a reliable 10 second timer, such that an event happens > every 10 seconds. It's no good if I get two events after 20 seconds, I > need one every 10 seconds. > > How is this possible to guarantee in .NET? The app is running on Windows > Server 2003 x64. > > TIA > > Charles > > |
My System Specs![]() |
| | #23 (permalink) |
| | Re: How to Make a .NET Timer Always Fire at the Right Time Hi Mike Thanks for the idea. I think I have it sorted now, but I will keep this in mind. Cheers Charles "Mike" <m.pires@newsgroup> wrote in message news:Ox499s#XKHA.3428@newsgroup Quote: > I don't know if is to late, to give you one idea, > > I did have the same problem, i did have to develop one small app, to keep > a VPN tunnel up and running, until change one of the VPN pix, > > What i did do to kip the connection up and running was a ICMP app, using > Background worker this basically ping a host from the other lan and this > way my pix that was broke dint let the tunnel get down. > And the BackGroundWorker don't let my CPU get stress up. > > Cheers, > > Mike > > > "Charles" <blank@newsgroup> wrote in message > news:eG3x2DvWKHA.4780@newsgroup Quote: >> This is a follow up to an earlier post, about a Threading.Timer that >> occasionally fired at odd times. In that case I discovered that low >> memory meant that the machine 'froze' intermittently and a timer callback >> could fire after 30 seconds instead of every 10 seconds as intended. >> >> I now find that if the machine becomes preoccupied with another task, I >> get the same effect. This is a very bad state of affairs, as I can no >> longer rely on my 10 second tick occurring every 10 seconds. >> >> I need to have a reliable 10 second timer, such that an event happens >> every 10 seconds. It's no good if I get two events after 20 seconds, I >> need one every 10 seconds. >> >> How is this possible to guarantee in .NET? The app is running on Windows >> Server 2003 x64. >> >> TIA >> >> Charles >> >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| What can I do to make sure the time is correct on the computers on our network? | Server General | |||
| Need to click twice to fire an Event | .NET General | |||
| DragEnter Does Not Fire? | .NET General | |||
| chocolate fire guard... | Vista General | |||
| FIRE FIRE !!!!!Video Games play over second page | Vista General | |||