Is the "sleep" command accurate ?
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Is the "sleep" command accurate ? Expand / Collapse
Author
Message
Posted 7/16/2007 1:08:58 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 7/30/2007 6:06:51 PM
Posts: 25, Visits: 36
Hello all,

   I'm wondering if it is wise to use the sleep() command in time critical events... I used visual basic a few years ago and I remember being told not to use sleep() because it is inaccurate, so I wonder if it is ok to use it in e-basic....

 Thanks,

  Guillaume

Post #498
Posted 7/17/2007 12:22:46 PM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: Today @ 5:00:06 PM
Posts: 569, Visits: 1,238
The Sleep command in E-Basic is more accurate that the Sleep command in Win32 API.  You are guaranteed that the Sleep will sleep at least the amount that you specify.  As with every command, you are at the will of the operating system that could pull the runtime out of the water.  However, E-Prime will accurately detect this and when you log information, the Clock.Read or other values will make that known.

-Brandon

Post #501
Posted 7/17/2007 12:58:15 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 7/30/2007 6:06:51 PM
Posts: 25, Visits: 36
Thank you for your help ! Now I won't feel bad when I use the sleep command
Post #502
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 6:06pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 10 queries. Compression Disabled.