pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:5014:    while (delay> (tv - t0) * (1.0 / CPU_TIME_TICKS))    tv = get_real_time();    }    }       /* fprintf (stderr, "slept %g\n", (tv - t0) * (1.0 / CPU_TIME_TICKS)); */   }      /*! @decl void sleep(int|float s, void|int abort_on_signal)    *! -  *! This function makes the program stop for @[s] seconds. +  *! This function makes the thread stop for @[s] seconds.    *!    *! Only signal handlers can interrupt the sleep, and only when    *! @[abort_on_signal] is set. If more than one thread is running    *! the signal must be sent to the sleeping thread. Other callbacks    *! are not called during sleep.    *!    *! If @[s] is zero then this thread will yield to other threads but    *! not sleep otherwise. Note that Pike yields internally at regular    *! intervals so it's normally not necessary to do this.    *!
pike.git/src/builtin_functions.c:5056:    pop_n_elems(args);       delaysleep(delay, do_abort_on_signal, 0);   }      #undef FIX_LEFT   #undef TIME_ELAPSED      /*! @decl void delay(int|float s)    *! -  *! This function makes the program stop for @[s] seconds. +  *! This function makes the thread stop for @[s] seconds.    *!    *! Only signal handlers can interrupt the sleep. Other callbacks are    *! not called during delay. Beware that this function uses busy-waiting    *! to achieve the highest possible accuracy.    *!    *! @seealso    *! @[signal()], @[sleep()]    */   PMOD_EXPORT void f_delay(INT32 args)   {