|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
How to sleep in Eiffel?Hi all,
Sorry to both the list with what is probably a trivial question, but I have not been able to find an answer through on-line searching: How does one "sleep" in Eiffel, i.e. go to sleep for a number of seconds (or better, microseconds)? Thanks, David ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/eiffel_software/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/eiffel_software/join (Yahoo! ID required) <*> To change settings via email: mailto:eiffel_software-digest@... mailto:eiffel_software-fullfeatured@... <*> To unsubscribe from this group, send an email to: eiffel_software-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
RE: How to sleep in Eiffel?David,
One way of doing this is to use Eiffel's "system" feature to call the sleep command of the underlying OS - see class EXECUTION_ENVIRONMENT, feature system. Unix example: system ("sleep 30") -- sleep 30 seconds Zak -----Original Message----- From: eiffel_software@... [mailto:eiffel_software@...] On Behalf Of panfriedwoggle Sent: 04 May 2008 09:17 To: eiffel_software@... Subject: [eiffel_software] How to sleep in Eiffel? Hi all, Sorry to both the list with what is probably a trivial question, but I have not been able to find an answer through on-line searching: How does one "sleep" in Eiffel, i.e. go to sleep for a number of seconds (or better, microseconds)? Thanks, David ------------------------------------ Yahoo! Groups Links Find out more about Talis at www.talis.com Shared InnovationTM Any views or personal opinions expressed within this email may not be those of Talis Information Ltd. The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited. Talis Information Ltd is a member of the Talis Group of companies and is registered in England No 3638278 with its registered office at Knights Court, Solihull Parkway, Birmingham Business Park, B37 7YB. ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/eiffel_software/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/eiffel_software/join (Yahoo! ID required) <*> To change settings via email: mailto:eiffel_software-digest@... mailto:eiffel_software-fullfeatured@... <*> To unsubscribe from this group, send an email to: eiffel_software-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: How to sleep in Eiffel?You can also inherit from THREAD_CONTROL (from the thread library) and
then use the sleep feature. Jann Zak Koufakis wrote: > David, > > One way of doing this is to use Eiffel's "system" feature to call the > sleep command of the underlying OS - see class EXECUTION_ENVIRONMENT, > feature system. > > Unix example: > > system ("sleep 30") -- sleep 30 seconds > > Zak > -----Original Message----- > From: eiffel_software@... > [mailto:eiffel_software@...] On Behalf Of panfriedwoggle > Sent: 04 May 2008 09:17 > To: eiffel_software@... > Subject: [eiffel_software] How to sleep in Eiffel? > > Hi all, > > Sorry to both the list with what is probably a trivial question, but I > have not been able to find an answer through on-line searching: > > How does one "sleep" in Eiffel, i.e. go to sleep for a number of > seconds (or better, microseconds)? > > Thanks, > > David > > > > ------------------------------------ > > Yahoo! Groups Links > > > > Find out more about Talis at www.talis.com > Shared InnovationTM > > > Any views or personal opinions expressed within this email may not be those of Talis Information Ltd. The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited. > > > Talis Information Ltd is a member of the Talis Group of companies and is registered in England No 3638278 with its registered office at Knights Court, Solihull Parkway, Birmingham Business Park, B37 7YB. > > ------------------------------------ > > Yahoo! Groups Links > > > -- Jann Roeder <roederja@...> ICQ: #29794099 PGP key ID: 0xFFA0F51D Reclaim Your Inbox! http://www.mozilla.org/products/thunderbird/ ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/eiffel_software/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/eiffel_software/join (Yahoo! ID required) <*> To change settings via email: mailto:eiffel_software-digest@... mailto:eiffel_software-fullfeatured@... <*> To unsubscribe from this group, send an email to: eiffel_software-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: How to sleep in Eiffel?I recently hit the same problem and found out that the feature
THREAD_CONTROL.sleep only works when the application has been compiled for multithreading. This is unfortunate since many console apps don't need to be MT. The THREAD_CONTROL class does have an invariant that's only true when the app has been compiled with MT enabled: thread_capable: {PLATFORM}.is_thread_capable The problem is if you inherit from THREAD_CONTROL (which I think is the common usage) and you perform an unqualified call to sleep(), the invariant won't be triggered. I don't understand why this MT requirement exists, I've never encountered it anywhere else. There's another sleep implementation in the WEL library, but that means referencing WEL for your application, which can add a significant amount of overhead (at least in compile time). Another alternative is to call to C directly to use a native or Posix sleep function. Greg C --- In eiffel_software@..., Jann Röder <roederja@...> wrote: > > You can also inherit from THREAD_CONTROL (from the thread library) and > then use the sleep feature. > > Jann > ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/eiffel_software/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/eiffel_software/join (Yahoo! ID required) <*> To change settings via email: mailto:eiffel_software-digest@... mailto:eiffel_software-fullfeatured@... <*> To unsubscribe from this group, send an email to: eiffel_software-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
| Free Forum Powered by Nabble | Forum Help |