Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - How to Make a .NET Timer Always Fire at the Right Time

Reply
 
Old 4 Weeks Ago   #21 (permalink)
Charles


 
 

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 SpecsSystem Spec
Old 4 Weeks Ago   #22 (permalink)
Mike


 
 

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 SpecsSystem Spec
Old 3 Weeks Ago   #23 (permalink)
Charles


 
 

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 SpecsSystem Spec
Reply

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


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46