Re: Sleep() is not accurate on XP P4 2.8G
From: Arkady Frenkel (arkadyf_at_hotmailxdotxcom)
Date: 10/19/04
- Next message: Arkady Frenkel: "Re: UDP Broadcast issues."
- Previous message: Arkady Frenkel: "Re: Win2K/XP SNTP Server Request/Response"
- In reply to: darrin Garrett: "Re: Sleep() is not accurate on XP P4 2.8G"
- Next in thread: Arkady Frenkel: "Re: Sleep() is not accurate on XP P4 2.8G"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 20 Oct 2004 00:43:52 +0200
That not depend on machine but OS because RT Oses reprogramming TIC - Timer
interrupt controller
to receive timer interrupts quicker than 10 msec , BTW NT kernel Oses ( sure
XP is NT kernel Os , because only
2 kind exist Win9x or NT - now you can choose :) ) reprogramming TIC too ,
because default is 55 msec ( as maybe you remember that tick in DOS 18.2
ticks per second ).That calculated from clock frequency - 1,193,180 Hz and
counter( each time counter set to zero timer interrupt generated) .
Default start value in dos is 0xFFFF ( 65535 ) , so 1193180/65535 gives 18.2
.
Arkady
"darrin Garrett" <dgarrett@airbiquity.com> wrote in message
news:41758FDE.8030402@airbiquity.com...
> Well, how many RTP 20ms audio sessions can one have up if their loop
> time for each session is > 15ms? Your answer sounds interesting, but
> why can I get 1ms messured incremenets on one identical machine and not
> of others. I also thought XP was not an NT based kernel. My problem is
> that I have done all of my VoIP development on the "Good" machine
> assuing they all worked the same, but it does not work so well on the
> other identical machines.
>
> Arkady Frenkel wrote:
> > Time tick in NT kernel Oses is 10 msec , and only in Windows CE is 1
msec.
> > So when you do Sleep less than 10 only next tick your thread will be
awaken
> > in the case of
> > no other thread with higher priority need to do something. That not
exactly
> > 10 because maybe you went to sleep close to tick , so your thread will
> > awaken not on next but next + 1 tick ( another 10 msec ) , so as average
you
> > have 15 msec
> > in NT kernel Oses , if you need 1 msec you need to use or multimedia
timers
> > with tick 1 msec or real time Oses or windows RT extensions ( Windows CE
,
> > VenturCom RTX , InTime( RMX ) ...) .
> >
> > For sure I can't in this MS Ng to propose non-windows RT Oses : QNX ,
> > vxWorks , RT Linux... :)
> >
> > BTW, why you ask that question on the network group :) ?
> >
> > Arkady
> >
> > "darrin Garrett" <dgarrett@airbiquity.com> wrote in message
> > news:41756B39.4050607@airbiquity.com...
> >
> >>QuerPerfrommanceCounter was one of the counters I used.
> >>
> >>qfel wrote:
> >>
> >>>That's because of system timer resolution. You can poll with
> >
> > high-resolution
> >
> >>>time functions like QueryPerformanceCounter to get better effects, but
> >
> > it
> >
> >>>will take CPU time.
> >>>
> >>>
> >>
> >
> >
>
- Next message: Arkady Frenkel: "Re: UDP Broadcast issues."
- Previous message: Arkady Frenkel: "Re: Win2K/XP SNTP Server Request/Response"
- In reply to: darrin Garrett: "Re: Sleep() is not accurate on XP P4 2.8G"
- Next in thread: Arkady Frenkel: "Re: Sleep() is not accurate on XP P4 2.8G"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|