From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m13-85.163.com (m13-85.163.com [220.181.13.85]) by ozlabs.org (Postfix) with SMTP id 4759167A42 for ; Thu, 25 May 2006 17:26:15 +1000 (EST) MIME-Version: 1.0 Message-ID: <44755859.0000CD.04146@bj163app85.163.com> Date: Thu, 25 May 2006 15:10:17 +0800 (CST) From: "hangtoo" To: "li yang-r58472" Subject: Re: RE: delay programming Content-Type: Multipart/Alternative; boundary="Boundary-=_PlqGWezynSiVDAfNzPRfMipmAPIP" Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --Boundary-=_PlqGWezynSiVDAfNzPRfMipmAPIP Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit hi, yes,you are right.the usleep didn't give out accurate delay.so I make a delay funtion to fix it. thank you for you help.:) regards tony That depends on how accurate you want. Sleep() functions can't be too accurate for Linux schedule characteristic. To get best accuracy, you can use hardware timer. udelay() is a choice which reduces the overall system performance. Best Regards, Leo > -----Original Message----- > From: linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org > [mailto:linuxppc-embedded-bounces+leoli=freescale.com@ozlabs.org] On Behalf > Of tony > Sent: Wednesday, May 24, 2006 5:24 PM > To: linuxppc-embedded@ozlabs.org > Subject: delay programming > > > hi all > I want to delay 1ms in the program, > does usleep(1000) works accurate? > any good idea? > > regards > tony > > > _______________________________________________ > Linuxppc-embedded mailing list > Linuxppc-embedded@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-embedded --Boundary-=_PlqGWezynSiVDAfNzPRfMipmAPIP Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable
hi,
    yes,you are right.the usleep didn't give out accu= rate delay.so I make a delay funtion to fix it.
   thank you for you help.:)
regards
tony
 


That depen=
ds on how accurate you want.  Sleep() functions can't be too accurate=20
for Linux schedule characteristic.  To get best accuracy, you can use har=
dware
timer.  udelay() is a choice which reduces the overall system performance=
=2E

Best Regards,
Leo


> -----Original Message-----
> From: linuxppc-embedded-bounces+leoli=3Dfreescale.com@ozlabs.org
> [mailto:linuxppc-embedded-bounces+leoli=3Dfreesca=
le.com@ozlabs.org] On Behalf
> Of tony
> Sent: Wednesday, May 24, 2006 5:24 PM
> To: linuxppc-embedded@ozlabs.org
> Subject: delay programming
>=20
>=20
> hi all
> =09I want to delay 1ms in the program,
> =09does usleep(1000) works accurate?
> =09any good idea?
>=20
> regards
> tony
>=20
>=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded






=09=C4=E3 =B2=BB =CF=EB = =CA=D4 =CA=D4 =BD=F1 =CF=C4 =D7=EE =A1=B0=BF=E1=A1=B1 =B5=C4 =D3=CA =CF=E4= =C2=F0 =A3=BF =09
=09 =D4=CC =BA=AD =D6=D0 =BB=AA =B4=AB =CD=B3= =CE=C4 =BB=AF =D3=DA =CA=C0 =BD=E7 =D2=BB =C1=F7 =BF=C6 =BC=BC =D6=AE =D6= =D0=A3=AC=B4=B4 =D0=C2 Ajax =BC=BC =CA=F5=A3=AC126 =A1=B0D =BC=C6 =BB=AE=A1= =B1=BB=F0 =C8=C8 =CC=E5 =D1=E9 =D6=D0 =A3=A1 --Boundary-=_PlqGWezynSiVDAfNzPRfMipmAPIP--