diff options
author | Brian Havard <bjh@apache.org> | 2000-06-11 07:16:51 +0000 |
---|---|---|
committer | Brian Havard <bjh@apache.org> | 2000-06-11 07:16:51 +0000 |
commit | 0d0c0a86859dddd1fac0a443108841bbc878597f (patch) | |
tree | 3a895d955df56640fef75a6118207fdc770f187e /time | |
parent | ae1f514dfdf29f663c60a2cf1d4ce0ee3ff9cba9 (diff) | |
download | apr-0d0c0a86859dddd1fac0a443108841bbc878597f.tar.gz |
Use OS/2 native call in ap_sleep().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60169 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'time')
-rw-r--r-- | time/unix/time.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/time/unix/time.c b/time/unix/time.c index 52733d3ab..492e41168 100644 --- a/time/unix/time.c +++ b/time/unix/time.c @@ -66,6 +66,10 @@ #if HAVE_TIME_H #include <time.h> #endif +#ifdef OS2 +#define INCL_DOS +#include <os2.h> +#endif /* End System Headers */ @@ -253,16 +257,17 @@ ap_status_t ap_put_os_exp_time(ap_exploded_time_t *aprtime, void ap_sleep(ap_interval_time_t t) { +#ifdef OS2 + DosSleep(t/1000); +#else struct timeval tv; tv.tv_usec = t % AP_USEC_PER_SEC; tv.tv_sec = t / AP_USEC_PER_SEC; select(0, NULL, NULL, NULL, &tv); +#endif } #ifdef OS2 -#define INCL_DOS -#include <os2.h> - ap_status_t ap_os2_time_to_ap_time(ap_time_t *result, FDATE os2date, FTIME os2time) { struct tm tmpdate; |