Re: Timing

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Malek (kemmou_at_arrabeta.com)
Date: 02/23/04


Date: Mon, 23 Feb 2004 04:30:10 -0000

Sorry, I am flatly wrong ... if you do control your cycles, at the speed you
are talking about, Richard is totally right ... a timer uses ticks, and will
not be slowed down... with time slicing, you can be pretty sure that you are
not getting any real delays to your execution..

"Malek" <kemmou@arrabeta.com> wrote in message
news:eYuzaPc%23DHA.2824@tk2msftngp13.phx.gbl...
> using a timer would seem a good option for slowing down the execution,
> however, the equation 1/speed is not good unless you can consider the
> execution of your code and anything else hapening on the machine to be
> indignificant ... I would benchmark to see how accurate that assertion is,
> and would adjust accordingly... maybe using some performance counters on
the
> process could help on the benchmark or could be added as adjusting factor
> during execution (to account for whatever else is going on on the machine
> that might slow your execution)
> "Richard Sadler" <ihaveaholeinmyarm@blueyonder.co.uk> wrote in message
> news:9E95FFFD-3907-43F0-BC7E-EADC55424457@microsoft.com...
> > Hey
> >
> > You could use a timer (System.Timers.Timer) and set the delay to 1 /
speed
> (so the time is in seconds) and then use the event to perform the next
> instruction on the processor.
>
>



Relevant Pages

  • Re: Debugging Challenge - no source available
    ... > custom controls. ... > few bitmap operations which use a timer to help time-slice so the UI ... > - the debugger stops at the Application.Runline, there's no call stack, ... > In both cases, the debugger catches execution at the same point, just ...
    (microsoft.public.dotnet.general)
  • Re: How to measure code execution time...?
    ... down clock, to get the execution time on a real processor. ... measure with an external timer. ...
    (comp.arch.embedded)
  • Window messages
    ... Load event handler set a timer for 200ms and the timer's Tick handler will ... In the execution of the Timer event I use a Process.WaitForExit function to ... window messages when my launcher application was running the timer event. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Timer
    ... I am attempting to execute a timer that will generate a number each ... that it creates to an Array. ... Basically, what I want to do is use the outputs (out1, out2) as the ... input arguments for the next execution of the timer function. ...
    (comp.soft-sys.matlab)
  • Re: timer
    ... or Timers.Timer classes execution of the callback method when time span ... BTW if you drag and drop this timer from ... you do have multithread execution ... "usha" wrote in message ...
    (microsoft.public.dotnet.framework.windowsforms)