9,869,444 members (27,713 online)
Visit CodeProject.TV
Discuss CodeProject.TV
Sign in
Email
Password
Forgot your password?
Sign in using
home
articles
Chapters and Sections
>
Search
Latest Articles
Latest Tips/Tricks
Top Articles
Beginner Articles
Technical Blogs
Posting/Update Guidelines
Article Help Forum
Article Competition
Submit an article or tip
Post your Blog
quick answers
Ask a Question
View Unanswered Questions
View All Questions...
C# questions
ASP.NET questions
VB.NET questions
C#4.0 questions
C++ questions
discussions
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work & Training Issues
Design and Architecture
ASP.NET
JavaScript
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
Adobe Technologies
C#
Free Tools
Objective-C
Ruby On Rails
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
.NET Framework
Mobile
VS 11 & .NET 4.5
Sharepoint
Silverlight / WPF
Visual Basic
Web Development
Site Bugs / Suggestions
features
Component & Service Catalog
Competitions
News
The Insider Newsletter
Newsletter archive
Surveys
Product Showcase
Research Library
CodeProject Stuff
community
The Insider News
The Lounge
The Weird & The Wonderful
The Soapbox
Press Releases
Who's Who
Most Valuable Professionals
Company Listings
Non-English Language
>
General Indian Topics
General Chinese Topics
help
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
Site Map
Advertise with us
Employment Opportunities
About Us
The default search term operator is
AND
.
You can use brackets,
AND
,
OR
, and
NOT
to improve your search. For example:
C# AND NOT(VB or SQL)
A query of a single
*
will return everything, filtered by any filters.
Filter examples:
Search by Author
author:"author name"
Filter by tag
tag:C#
or
tag:(C++ or Java)
Wildcard search
use "?" or "*" eg.
gr?d
or
gr*
28 Results
Search
Everything
Articles
Technical Blogs
Tips & Tricks
Questions
Answers
Forum Messages
News Items
Catalog Items
Videos
Training Courses
Just My Stuff
My Bookmarks
Sort by
Relevance
Rating Asc
Rating Desc
Title Asc
Title Desc
Author Asc
Author Desc
Date Created Asc
Date Created Desc
Date Modified Asc
Date Modified Desc
Price Asc
Price Desc
Duration Asc
Duration Desc
Match
All Fields
Title
Description
Author(s)
Tags
Any Date
Last 12 hours
Last 24 hours
Last week
Last 2 weeks
Last month
Last 3 months
Last 6 months
Last year
January
February
March
April
May
June
July
August
September
October
November
December
Rating Range
All - Including Unrated
1.0 - 5.0
2.0 - 5.0
3.0 - 5.0
4.0 - 5.0
4.5 - 5.0
4.8 - 5.0
5.0
Advanced Filters:
Article Topics
All Topics
Desktop Development
Web Development
Mobile Development
Cloud Computing
Enterprise Systems
Database
Multimedia
Languages
Platforms, Frameworks & Libraries
General Programming
Graphics / Design
Development Lifecycle
General Reading
Third Party Products
Mentor Resources
Article License
All Licenses
CPOL
CDDL
Ms-PL
MPL
CPL
Eclipse
MIT
BSD
Apache
CC (ASA 2.5)
Zlib
Public Domain
CC (Attr 3U)
CC (ASA 3U)
LGPL3
GPL3
Forums
All Forums
Feature Forums
General Programming
Web Development
Product Lifecycle
Database & SysAdmin
General Discussions
Non-English Language
Catalog Category
All Categories
Books & Training
Charting & Graphing
Components, Controls, Libraries
Data Manipulation & Mining
Database Tools
Debugging
Documentation & Help
Financial, Math & Scientific
Frameworks & APIs
General Development Tools
GIS & Maps
Graphics & 3D Modeling
Hardware and Robotics
Hosting
IDEs
Imaging
Mobility
Multimedia
Networking
Performance and Profiling
Programming Languages
Project Life-cycle Management (ALM)
Reporting
Search
Security
Setup & Deploy
System Adminstration
Utilities
Virtualization
Web Design/Development
Catalog License
All Licenses
Commercial
Fully Function Evaluation version
Limited Functionality Trial
Limited Time Trial
Shareware
Free For Personal Use
Freeware
Page 1 of 1
Page Size:
10
·
25
·
50
Author filtered by: ken.loveday
[x]
Re: Cross-thread operation not valid
by
ken.loveday
Forum Message
15 Apr 2013
Hi Martina, I've now added a WinForms example to the project, I hope this helps! Ken.
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
Microsecond and Millisecond C# Timer
by
ken.loveday
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.
Languages
»
C#
»
Utilities
C#
Windows
.NET
Dev
Intermediate
time
performance
Re: Cross-thread operation not valid
by
ken.loveday
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
Re: My vote of 5
by
ken.loveday
Forum Message
18 Mar 2013
Thanks for your vote!
General Discussions
»
Article "Simple C++ Timer Wrapper For Windows"
Re: Excellent Implementation. Found a small bug and its work around for now
by
ken.loveday
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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.
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
Re: My vote of 5
by
ken.loveday
Forum Message
20 Feb 2013
Thanks!
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
Re: My vote of 5
by
ken.loveday
Forum Message
4 Dec 2012
Glad it was helpful and thanks for your vote.
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
My vote of 5
by
ken.loveday
Forum Message
7 Dec 2011
Very good tutorial. Thanks for taking the time to write it!
General Discussions
»
Article "Wpf/Mvvm Quick Start Tutorial"
Re: My vote of 5
by
ken.loveday
Forum Message
29 Nov 2011
Thanks for your vote!
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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.
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net 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.
Languages
»
C / C++ Language
»
Templates
C++
Windows
Win32
Visual-Studio
MFC
ATL
Dev
Intermediate
MVC
Threading
, +
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
Re: When spinning and actively waiting for something...
by
ken.loveday
Forum Message
2 Aug 2010
Good point!
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
Re: I really want to give this one a five
by
ken.loveday
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
Re: I really want to give this one a five
by
ken.loveday
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)"
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
Re: I really want to give this one a five
by
ken.loveday
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
General Discussions
»
Article "Accurate Microsecond And Millisecond .Net Timer"
Page 1 of 1
First
·
Prev
·
Next
·
Last
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