Click here to Skip to main content
15,895,799 members
Home / Discussions / C#
   

C#

 
GeneralRe: System,Timers.Timer to slow in C# Pin
Member 994007330-Jul-13 1:49
Member 994007330-Jul-13 1:49 
GeneralRe: System,Timers.Timer to slow in C# Pin
AmitGajjar30-Jul-13 2:41
professionalAmitGajjar30-Jul-13 2:41 
GeneralRe: System,Timers.Timer to slow in C# Pin
Member 994007330-Jul-13 2:56
Member 994007330-Jul-13 2:56 
GeneralRe: System,Timers.Timer to slow in C# Pin
AmitGajjar30-Jul-13 19:29
professionalAmitGajjar30-Jul-13 19:29 
AnswerRe: System,Timers.Timer to slow in C# Pin
Eddy Vluggen30-Jul-13 0:26
professionalEddy Vluggen30-Jul-13 0:26 
AnswerRe: System,Timers.Timer to slow in C# Pin
Alan N30-Jul-13 1:26
Alan N30-Jul-13 1:26 
GeneralRe: System,Timers.Timer to slow in C# Pin
Rob Philpott30-Jul-13 19:31
Rob Philpott30-Jul-13 19:31 
AnswerRe: System,Timers.Timer to slow in C# Pin
BillWoodruff30-Jul-13 5:06
professionalBillWoodruff30-Jul-13 5:06 
For most purposes, the advice that (always reliable) Pete O'Hanlon gave you, to use an instance of System.Diagnostics.Stopwatch: is what you need.

But, given your requirements, you may also want to examine this April 13, CodeProject article: "Microsecond and Millisecond C# Timer," by Ken Loveday: [^].

And, possibly other resources on high-precision .NET timing at: [^].

However, I do not know if any of the techniques above can meet your requirements: I have never needed higher-precision timing than that provided by 'Stopwatch.

When you use the 'Stopwatch class, I hope you don't make the same stupid mistake I made recently [^], and use Stopwatch.Elapsed.Milliseconds, thinking that gets the total time, instead of Stopwatch.TotalElapsedMilliseconds, as was kindly pointed out to me by Alan N. here on this forum: [^].

good luck, Bill

~
“This isn't right; this isn't even wrong." Wolfgang Pauli, commenting on a physics paper submitted for a journal


modified 30-Jul-13 12:16pm.

AnswerRe: System,Timers.Timer to slow in C# Pin
DaveyM6930-Jul-13 6:46
professionalDaveyM6930-Jul-13 6:46 
AnswerRe: System,Timers.Timer to slow in C# Pin
jschell30-Jul-13 8:24
jschell30-Jul-13 8:24 
Questionvb6 dll use in vb.net project but grid not show Pin
sanket16429-Jul-13 22:05
sanket16429-Jul-13 22:05 
SuggestionRe: vb6 dll use in vb.net project but grid not show Pin
Richard MacCutchan29-Jul-13 22:07
mveRichard MacCutchan29-Jul-13 22:07 
QuestionHow to take continuous backup of database Pin
Code-Hunt29-Jul-13 21:03
Code-Hunt29-Jul-13 21:03 
AnswerRe: How to take continuous backup of database Pin
Mycroft Holmes29-Jul-13 21:40
professionalMycroft Holmes29-Jul-13 21:40 
AnswerRe: How to take continuous backup of database Pin
Keith Barrow29-Jul-13 23:26
professionalKeith Barrow29-Jul-13 23:26 
GeneralRe: How to take continuous backup of database Pin
Code-Hunt29-Jul-13 23:28
Code-Hunt29-Jul-13 23:28 
GeneralRe: How to take continuous backup of database Pin
Jay Nardev30-Jul-13 23:11
Jay Nardev30-Jul-13 23:11 
Questionchm converter C# WinForms Pin
C#/ASP29-Jul-13 18:32
C#/ASP29-Jul-13 18:32 
AnswerRe: chm converter C# WinForms Pin
Richard MacCutchan29-Jul-13 20:57
mveRichard MacCutchan29-Jul-13 20:57 
AnswerRe: chm converter C# WinForms Pin
Manfred Rudolf Bihy29-Jul-13 21:57
professionalManfred Rudolf Bihy29-Jul-13 21:57 
QuestionNeed suggestions for C# project Pin
jeedolas29-Jul-13 1:30
jeedolas29-Jul-13 1:30 
AnswerRe: Need suggestions for C# project Pin
Pete O'Hanlon29-Jul-13 1:40
mvePete O'Hanlon29-Jul-13 1:40 
GeneralRe: Need suggestions for C# project Pin
jeedolas29-Jul-13 2:08
jeedolas29-Jul-13 2:08 
GeneralRe: Need suggestions for C# project Pin
Pete O'Hanlon29-Jul-13 2:12
mvePete O'Hanlon29-Jul-13 2:12 
GeneralRe: Need suggestions for C# project Pin
jeedolas29-Jul-13 2:20
jeedolas29-Jul-13 2:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.