Click here to Skip to main content
15,885,876 members
Home / Discussions / C#
   

C#

 
QuestionSystem,Timers.Timer to slow in C# Pin
Member 994007329-Jul-13 23:28
Member 994007329-Jul-13 23:28 
AnswerRe: System,Timers.Timer to slow in C# Pin
Pete O'Hanlon30-Jul-13 0:23
mvePete O'Hanlon30-Jul-13 0:23 
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 
Member 9940073 wrote:
The System.Timers.Timer is too slow in my application.

That's beautifully vague but I'll assume that you are wondering why the real timer interval is fairly consistent but is is not 20ms.

The timer does not have a millisecond resolution and although the programmer may set different values e.g. 17, 18, 19 or 20 ms the actual interval obtained may not vary. On most systems the resolution of the timer is 15.625 ms which means that the real timer intervals can only be multiples of 15.625ms, i.e. 15.625, 31.25, 46.875 etc. So when you set 20ms, what you actually get is rounded up to the next possible real interval, i.e. 31.25ms.

As Eddy said in his reply the operating system is not real time and the timer event may be delayed slightly beyond the rounded up interval.

Alan.
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 
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 

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.