pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2001-07-24
2001-07-24 01:15:24 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
f8133756cdf4b57edaebacd2fd23c1887c98c1ff (
18
lines) (+
14
/-
4
)
[
Show
|
Annotate
]
Branch:
7.9
sleep(x,1) now does something again... (backport me!)
Rev: src/builtin_functions.c:1.397
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
396
2001/07/
16
23
:
48
:
22
nilsson
Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
397
2001/07/
24
01
:
15
:
24
hubbe
Exp $");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
3429:
double delay=0.0; double target; int do_microsleep;
+
int do_abort_on_signal;
#ifdef HAVE_GETHRTIME t0=tv=gethrtime();
3465:
return; }
+
if(args > 1 && !IS_ZERO(Pike_sp + 1-args))
+
{
+
do_microsleep=0;
+
do_abort_on_signal=1;
+
}else{
do_microsleep=delay<10;
-
+
do_abort_on_signal=0;
+
}
pop_n_elems(args);
-
-
if (delay>POLL_SLEEP_LIMIT)
+
if (delay>POLL_SLEEP_LIMIT
|| !do_microsleep
)
{ while(1) {
3496:
} while(0); THREADS_DISALLOW();
+
if(do_abort_on_signal) return;
+
FIX_LEFT(); if(left<=0.0)