|
In lugnet.robotics.rcx.legos, Ross Hennessy writes:
> Hi again,
>
> i would like to know which is more efficient in code? having a while loop
> which is checking for a condition to be true and sleeping for an arbitary value
> while it is not, or using a wait_event statement passing a function pointer to
> a method which checks for the same condition?
Ross,
I can't speak about efficiency - I dont know enogh about embedded programming,
but I've had better results using wait_event. I've tried both msleep() and
yield() in a loop, and just calling wait_event with a function that always
returns 0 seems to work the best for me. But if any experts want to share any
more conclusive information, I'd be interested, too 8?)
Regards,
ROSCO
|
|
Message is in Reply To:
| | sleep efficientcy
|
| Hi again, i would like to know which is more efficient in code? having a while loop which is checking for a condition to be true and sleeping for an arbitary value while it is not, or using a wait_event statement passing a function pointer to a (...) (24 years ago, 25-Jan-01, to lugnet.robotics.rcx.legos)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|