Re: On the sleep()
- From: hohhot <hohhot@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 2 Aug 2005 23:22:03 -0700
"Peter van der Goes" wrote:
>
> "hohhot" <hohhot@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:7D84E3FF-4CF8-45E2-AD93-C17CF530E8C4@xxxxxxxxxxxxxxxx
> > Hi, everyone,
> >
> > I have a question on the sleep() function.
> >
> > the prototype for sleep() is
> >
> > VOID Sleep(
> > DWORD dwMilliseconds
> > );
> >
> > dwMilliseconds
> > [in] Minimum time interval for which execution is to be suspended, in
> > milliseconds.
> >
> > But 1 milliseconds is too long for me, I need a short value for it, how
> > can
> > I do?
> >
> > Thanks a lot!
>
> I'm a bit confused. As one millisecond is 1/1000 of a second, what
> circumstances would create a need to pause an application for < 1/1000 of a
> second? Can you describe your situation so that alternative approaches might
> be suggested?
>
> --
> Peter [MVP Visual Developer]
> Jack of all trades, master of none.
>
>
>
Thank you very much, Mr. Peter.
I will explain the situation more detail now:
We are developing a communication software on the PC side, the counterparter
is a MCU.
The sleep() is called for data synchronization, but 1 millisecond is too
long -- the baud rate is 9600bps, so I need a solution, a more accurate
version sleep() for this purpose.
.
- Follow-Ups:
- Re: On the sleep()
- From: *** Grier
- Re: On the sleep()
- References:
- On the sleep()
- From: hohhot
- Re: On the sleep()
- From: Peter van der Goes
- On the sleep()
- Prev by Date: Re: On the sleep()
- Next by Date: Re: On the sleep()
- Previous by thread: Re: On the sleep()
- Next by thread: Re: On the sleep()
- Index(es):