Click here to Skip to main content
15,914,416 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: ProgressBar Control Pin
Luc Pattyn25-Nov-07 3:09
sitebuilderLuc Pattyn25-Nov-07 3:09 
QuestionLogs, logging, best practice... advice please Pin
Oshtri Deka23-Nov-07 10:06
professionalOshtri Deka23-Nov-07 10:06 
AnswerRe: Logs, logging, best practice... advice please Pin
Robert Rohde24-Nov-07 21:41
Robert Rohde24-Nov-07 21:41 
AnswerRe: Logs, logging, best practice... advice please Pin
Not Active25-Nov-07 12:51
mentorNot Active25-Nov-07 12:51 
AnswerRe: Logs, logging, best practice... advice please Pin
Vasudevan Deepak Kumar25-Nov-07 18:11
Vasudevan Deepak Kumar25-Nov-07 18:11 
AnswerRe: Logs, logging, best practice... advice please Pin
PIEBALDconsult26-Nov-07 9:28
mvePIEBALDconsult26-Nov-07 9:28 
QuestionAccurate DateTime.Now change notifications? Pin
chaiguy133723-Nov-07 7:35
chaiguy133723-Nov-07 7:35 
AnswerRe: Accurate DateTime.Now change notifications? Pin
Luc Pattyn23-Nov-07 8:25
sitebuilderLuc Pattyn23-Nov-07 8:25 
There is no way you can achieve that on a standard PC; the Windows kernel is not a real-time
kernel, so at best it makes a good effort at doing everything that is required with an
acceptable delay. Have you noticed the number of processes and threads on a typical system?
They all try to get their share of the CPU cycles!

What you can do is install a periodic timer that ticks a few times in your required
period (say at 200 msec if you want 1 second); that way, if your process gets a sufficient
share of the CPU cycles, it will be able to see a new period has elapsed with an accuracy
of around 20%. You can improve on the numbers but:
- shorter ticks will increase the CPU load of your process;
- other processes that are running on a higher priority, as well as all interrupts (e.g.
network traffic) may temporarily shut off your process, in which case the actual timer tick
will be seen late.

Another thing you can try is increase the process or thread priority, but as soon as they
go "above normal" other interactive actions may suffer.

The best result can be obtained by writing a device driver, which could run at a "real-time
priority", that is above all interactive tasks. But that excludes the use of .NET, the
CLR and its managed languages.

BTW: if you are relying on standard .NET timer classes for good accuracy, you may want
to read my timers article.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]


this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets


GeneralRe: Accurate DateTime.Now change notifications? Pin
chaiguy133723-Nov-07 8:37
chaiguy133723-Nov-07 8:37 
QuestionCalling .m file from VB .Net Pin
Atrish22-Nov-07 19:57
Atrish22-Nov-07 19:57 
AnswerRe: Calling .m file from VB .Net Pin
Vasudevan Deepak Kumar22-Nov-07 20:59
Vasudevan Deepak Kumar22-Nov-07 20:59 
AnswerRe: Calling .m file from VB .Net Pin
Dave Kreskowiak23-Nov-07 5:15
mveDave Kreskowiak23-Nov-07 5:15 
QuestionRestarting of remote-type's server Pin
Kurkin Dmitry22-Nov-07 18:22
Kurkin Dmitry22-Nov-07 18:22 
QuestionMicrosoft .NET Framework 3.0 Service Pack 1 Pin
mejax22-Nov-07 7:54
mejax22-Nov-07 7:54 
AnswerRe: Microsoft .NET Framework 3.0 Service Pack 1 Pin
Vasudevan Deepak Kumar22-Nov-07 21:01
Vasudevan Deepak Kumar22-Nov-07 21:01 
QuestionBring .NET windows to the front Pin
__DanC__22-Nov-07 2:34
__DanC__22-Nov-07 2:34 
AnswerRe: Bring .NET windows to the front Pin
chaiguy133723-Nov-07 7:40
chaiguy133723-Nov-07 7:40 
QuestionLogin Control Pin
Rock Star.22-Nov-07 1:32
Rock Star.22-Nov-07 1:32 
AnswerRe: Login Control Pin
Pete O'Hanlon22-Nov-07 1:48
mvePete O'Hanlon22-Nov-07 1:48 
QuestionDoc to PDF conversion Pin
mynameatif21-Nov-07 2:07
mynameatif21-Nov-07 2:07 
AnswerRe: Doc to PDF conversion Pin
Vasudevan Deepak Kumar21-Nov-07 3:31
Vasudevan Deepak Kumar21-Nov-07 3:31 
QuestionRunning 1.0, 1.1 and 2.0 applications at the same time... Pin
martin_hughes20-Nov-07 23:39
martin_hughes20-Nov-07 23:39 
AnswerRe: Running 1.0, 1.1 and 2.0 applications at the same time... Pin
Pete O'Hanlon20-Nov-07 23:56
mvePete O'Hanlon20-Nov-07 23:56 
GeneralRe: Running 1.0, 1.1 and 2.0 applications at the same time... Pin
martin_hughes21-Nov-07 0:10
martin_hughes21-Nov-07 0:10 
GeneralRe: Running 1.0, 1.1 and 2.0 applications at the same time... Pin
Dave Kreskowiak21-Nov-07 16:40
mveDave Kreskowiak21-Nov-07 16:40 

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.