Click here to Skip to main content
Page 1 of 1
Page Size: 10 · 25 · 50


Author filtered by: ken.loveday [x]
Forum Message 15 Apr 2013  
Hi Martina, I've now added a WinForms example to the project, I hope this helps! Ken.
Article 14 Apr 2013   license: CPOL
MicroTimer: A microsecond and millisecond timer in C# that is used in a similar way to the .NET System.Timers.Timer.
Forum Message 12 Apr 2013  
Hi Martina. The interval is in microseconds (not milliseconds), I expect you meant to write: microtimer1.Interval = 1000; If you are updating a UI thread from another thread
Re: My vote of 5 by ken.loveday
Forum Message 18 Mar 2013  
Thanks for your vote!
Forum Message 25 Feb 2013  
Hi wakaley, Thanks for the feedback and thanks for your vote, I'm glad the MicroTimer has proved useful. If implemented correctly, declaring the MicroTimer as a class member and having separate
Re: My vote of 5 by ken.loveday
Forum Message 21 Feb 2013  
Ha, ha, :laugh: Thanks for your vote and I hope you find the timer useful.
Re: My vote of 5 by ken.loveday
Forum Message 20 Feb 2013  
Hi Zaid, Thanks for your vote. I feel your pain on discovering the hard way the poor resolution offered by the Timer class. I appreciate it is a very hard problem to solve, but I hope one day ther
Re: Little bug by ken.loveday
Forum Message 20 Feb 2013  
Hi D-Three, Following your (very helpful) feedback, 'Interval' and 'IgnoreEventIfLateBy' can now be changed whilst the timer is enabled. I've also fixed the unhandled exception error if Stop() is
Re: Little bug by ken.loveday
Forum Message 16 Jan 2013  
That's a very good point about changing the Interval and IgnoreEventIfLateBy while the timer is running, I'll definitely look at that when I next do an update. Thanks for the feedback - all very help
Re: Little bug by ken.loveday
Forum Message 8 Jan 2013  
Hi D-Three, Firstly thanks very much for your vote, very pleased to hear the MicroTimer has been useful. Secondly, thanks for pointing out the bug, bit of a 'school boy' error on my part! Next
Re: My vote of 5 by ken.loveday
Forum Message 4 Dec 2012  
Glad it was helpful and thanks for your vote.
Re: MicroStopwatch by ken.loveday
Forum Message 7 Mar 2012  
Hi dabalciunas, The MicroStopwatch class is correct as it is. The Elapsed property returns a TimeSpan, thus it would be possible to replace the ElapsedMicroseconds function with the code below (bu
Re: CPU Load by ken.loveday
Forum Message 18 Feb 2012  
Hi, In practice the minimum sleep achievable is around the 15ms mark (even if you request 1ms). Instead of a sleep the code uses a 'SpinWait', this is not a sleep but runs for a few nanoseconds and
Re: CPU Load by ken.loveday
Forum Message 3 Feb 2012  
Hi, The only way to achieve such a high timer resolution (in the micro/millisecond range) is for the code to sit in a very tight while loop. The consequence of doing this is that a very heavy load
Re: My vote of 5 by ken.loveday
Forum Message 28 Dec 2011  
Hi Chong Andy, Thanks for your vote. I've not done so but it should be possible to produce similar code for Windows in C++. QueryPerformanceCounter() and QueryPerformanceFrequency() can be us
My vote of 5 by ken.loveday
Forum Message 7 Dec 2011  
Very good tutorial. Thanks for taking the time to write it!
Re: My vote of 5 by ken.loveday
Forum Message 29 Nov 2011  
Thanks for your vote!
Re: is it unstable? by ken.loveday
Forum Message 28 Nov 2011  
Hi AuspexPT, Thought you would like to know that I've updated the project. The MicroLibray should now work with your original code. Ken.
Re: is it unstable? by ken.loveday
Forum Message 19 Nov 2011  
Hi AuspexPT, Glad to help. In answer to your question, the other solution would be to remove the while(Enabled){} loop in the MicroTimer Stop() function. When I originally wrote the article I wa
Re: is it unstable? by ken.loveday
Forum Message 15 Nov 2011  
Hi AuspexPT, You are correct, the timer does enter an infinite loop. The code below should fix your problem: if (Cursor.Position == destinationPoint) //condition to stop the timer
Simple C++ Timer Wrapper by ken.loveday
Article 15 Jan 2011   license: CPOL
TemplateTimer: A convenient and simple MSVC / C++ timer wrapper for Windows using templates, where a class function can be easily specified for the timed event callback.
Re: Waveform From OSC ! by ken.loveday
Forum Message 3 Aug 2010  
Hi Shem, Thanks very much for this, this is a really interesting test. Clearly the maximum turnaround time (on your system) is 10μs, it would be interesting to run the test on a faster and/or slow
Forum Message 2 Aug 2010  
Hi Shem, I thought the idea of using an oscilloscope on the parallel port was a really good one. I would be very interested to see the results when you've done the tests. Ken
Forum Message 2 Aug 2010  
Yes sorry, that should have read "My Dell Inspiron reports the stopwatch timer frequency as 1,948,496 (i.e. 2 ticks every microsecond)"
Re: Hmmm... by ken.loveday
Forum Message 1 Aug 2010  
Hi Bob, Thanks for your comments, I spent a fair amount of time playing with thread and process priorities (http://msdn.microsoft.com
Forum Message 1 Aug 2010  
Hi Ken (good name!), Thanks for your reply. Good question! The simple answer is that it is very hard to test it. The only way to really test it is using a piece of hardware containing a reference

Page 1 of 1


Advertise | Privacy | Mobile
Web04 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid