diff options
author | Zeev Suraski <zeev@php.net> | 1999-04-24 16:17:04 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-04-24 16:17:04 +0000 |
commit | 6ecc81c097e6736f77df3806247a787f17fa714a (patch) | |
tree | 484ec907ae9e2e594fe224ef0c088f7109aa4398 | |
parent | e06a1ed265bc8141bf5cfab96753db7d21df2d9f (diff) | |
download | php-git-6ecc81c097e6736f77df3806247a787f17fa714a.tar.gz |
We'd have to find a different way of allowing timeouts in Win32
-rw-r--r-- | main/main.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/main/main.c b/main/main.c index 0b4596c742..b28c75f5f4 100644 --- a/main/main.c +++ b/main/main.c @@ -248,12 +248,6 @@ static int module_initialized = 0; * Globals yet to be protected */ -#if WIN32|WINNT -unsigned int wintimer; -unsigned int timerstart; -unsigned int wintimer_counter = 0; -#endif - #if APACHE request_rec *php3_rqst = NULL; /* request record pointer for apache module version */ #endif @@ -496,14 +490,8 @@ static void php3_timeout(int dummy) static void php3_set_timeout(long seconds) { #if WIN32|WINNT - if (seconds > 0) { - timerstart = (unsigned int) clock(); - wintimer = timerstart + (CLOCKS_PER_SEC * seconds); - } else { - wintimer = 0; - } #else -#if HAVE_SETITIMER +# if HAVE_SETITIMER struct itimerval t_r; /* timeout requested */ t_r.it_value.tv_sec = seconds; @@ -511,7 +499,7 @@ static void php3_set_timeout(long seconds) setitimer(ITIMER_PROF, &t_r, NULL); signal(SIGPROF, php3_timeout); -#endif +# endif #endif } @@ -519,15 +507,14 @@ static void php3_set_timeout(long seconds) static void php3_unset_timeout() { #if WIN32|WINNT - wintimer = 0; #else -#if HAVE_SETITIMER +# if HAVE_SETITIMER struct itimerval no_timeout; no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec = no_timeout.it_interval.tv_usec = 0; setitimer(ITIMER_PROF, &no_timeout, NULL); -#endif +# endif #endif } |