To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1663
    sleep efficientcy —Ross Hennessy
   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)
   
        Re: sleep efficientcy —Ross Crawford
     (...) value (...) 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 (...) (24 years ago, 25-Jan-01, to lugnet.robotics.rcx.legos)
   
        Re: sleep efficientcy —Lester Witter
   (...) value (...) There are two issues: 1 do you want to do anything while waiting, 2 how quick do you want to respond to the event. In both cases using an event is better. You can do something else until the event happens (synchronization issuses (...) (24 years ago, 25-Jan-01, to lugnet.robotics.rcx.legos)
 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR