now.ticks does not work

  • Thread starter Thread starter Willie jan
  • Start date Start date
Armin,
My understanding is even when a thread or process's priority is *very* high,
the OS may use "priority boosting" to raise the lesser threads up to give
them a slight chance of having some time.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/priority_boosts.asp

Jay

| > My second point is that an individual database call may be "off"
| > (because of other processes running & possibly the network itself),
|
|
| Unless you set the priority *very* high. ;-) But the user probably won't
| like this. (and it's not good design to do it just for more accurate
| measuring (apart from testing purposes)).
|
|
| Armin
 
Jay B. Harlow said:
Armin,
My understanding is even when a thread or process's priority is
*very* high, the OS may use "priority boosting" to raise the lesser
threads up to give them a slight chance of having some time.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/priority_boosts.asp



Yes, but the higher the priority the better the results when measuring the
time because the probability of being interrupted will be lower. If the
base priorty is 31, it wouldn't help other threads anyway (Willie, "don't
try this at home" - unless you know what you're doing). I didn't want to go
into details as it was not meant really seriously.

(BTW, the system's crystal is running @ 14,318,181 MHz. The value returned
by QueryPerformanceFrequency is 3,579,545. This is the first value divided
by 4. Means, every 4th base tick, the HP counter is increased.
Another divider is 12. Result=1193182 (14318181/12). (Actually 1193180 has
been used but nobody really knows why). On former systems (or still?), every
65536 (0x10000) tick, the timer interrupt has been raised: 1193182/65536 =
18.2 times a second. Every 11932st tick, the time (also returned by
DateTime.Now) is updated. This means 1193182/11932 ~ 100 times a second.)


Armin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top