EmbLogic's Blog

doubts on delay & sleep

what is diffference between delay ,sleep & wait…which one to use when?please clarify.

3 Responses to doubts on delay & sleep

  1. nitin.sharma says:

    wait system call will halt your parent until one of the child process terminates.
    if we use of waitpid(pid) system call, then parent process will suspend its execution until the child process specified by pid terminates.

    sleep system call will suspend the execution of process for the time specified as argument

  2. DELAY is basically the wasting of machine cycle (time) or we can say that providing time within execution of two commands….

    WAIT is like waiting for a particular process to complete…..

    Sleep is, according to me the time period when no process is taking place …..(not so sure abt sleep) .

    correct me if i am wrong..

  3. @ nitin sahrama : so, is sleep and delay are similar????

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>