For Programmers: Free Programming Magazines  


Home > Archive > Clipper > January 2005 > question about os_yield









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author question about os_yield
Andreas Moroder

2005-01-05, 3:55 pm

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

Dave Pearson

2005-01-06, 3:55 am

* 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 Windows.
http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
Andreas Moroder

2005-01-07, 3:55 pm

Dave Pearson schrieb:
> * Andreas Moroder <Andreas.moroder@[>:
>
>
>
>
> 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
> `----
>

Hello Dave,

it was a typo.
I solved it with a loop like the loop in your sample and it works.

Thanks
Andreas
Dave Pearson

2005-01-10, 8:55 pm

* 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 Windows.
http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
Andreas Moroder

2005-01-12, 8:55 am

Dave Pearson schrieb:
> * Andreas Moroder <Andreas.moroder@[>:
>
>
>
>
> 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
> `----
>

Hello Dave,

it was a typo.
I solved it with a loop like the loop in your sample and it works.

Thanks
Andreas
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com