Code Comments
Programming Forum and web based access to our favorite programming groups.Hello, I use os_yield to yield time to windows while my clipper application is waiting for a key input. What if I don't want to wait for a key input but simply would like to wait for a certain amount of time ? Is there a way to completely give away my timeslices for this amount of time ( a harware timer or a windows timer ? ) Thanks Andreas
Post Follow-up to this message* Andreas Moroder <Andreas.moroder@[>: > What if I don't want to wait for a key input but simply would like to wait > for a certain amount of time ? Is there a way to completely give away my > timeslices for this amount of time ( a harware timer or a windows timer ? > ) Have you tried looping over a call to OL_Yield() (I take it that was a typo in the subject?) while waiting for the desired amount of time to expire? Like: ,---- | Do While SomeCalculationOfExpiredTime() | OL_Yield() | EndDo `---- -- Dave Pearson | OSLib - Timeslice release functions. http://www.davep.org/ | eg - Norton Guide reader for Linux . http://www.davep.org/clipper/ | weg - Norton Guide reader for Windo ws. http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
Post Follow-up to this messageDave Pearson schrieb: > * Andreas Moroder <Andreas.moroder@[>: > > > > > Have you tried looping over a call to OL_Yield() (I take it that was a typ o > in the subject?) while waiting for the desired amount of time to expire? > Like: > > ,---- > | Do While SomeCalculationOfExpiredTime() > | OL_Yield() > | EndDo > `---- > Hello Dave, it was a typo. I solved it with a loop like the loop in your sample and it works. Thanks Andreas
Post Follow-up to this message* Andreas Moroder <Andreas.moroder@[>: > What if I don't want to wait for a key input but simply would like to wait > for a certain amount of time ? Is there a way to completely give away my > timeslices for this amount of time ( a harware timer or a windows timer ? > ) Have you tried looping over a call to OL_Yield() (I take it that was a typo in the subject?) while waiting for the desired amount of time to expire? Like: ,---- | Do While SomeCalculationOfExpiredTime() | OL_Yield() | EndDo `---- -- Dave Pearson | OSLib - Timeslice release functions. http://www.davep.org/ | eg - Norton Guide reader for Linux . http://www.davep.org/clipper/ | weg - Norton Guide reader for Windo ws. http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
Post Follow-up to this messageDave Pearson schrieb: > * Andreas Moroder <Andreas.moroder@[>: > > > > > Have you tried looping over a call to OL_Yield() (I take it that was a typ o > in the subject?) while waiting for the desired amount of time to expire? > Like: > > ,---- > | Do While SomeCalculationOfExpiredTime() > | OL_Yield() > | EndDo > `---- > Hello Dave, it was a typo. I solved it with a loop like the loop in your sample and it works. Thanks Andreas
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.