summaryrefslogtreecommitdiffstats
path: root/time.c
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:27 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:27 -0800
commitc7d035ae1a729232579a0fe41ed5affa131d3623 (patch)
treefb387f7c2a8e01cf603d4c75fbbaa68f711df986 /time.c
parentdeda2c0fd8689349fea2a900199a76ff7ecb319e (diff)
downloadscm-c7d035ae1a729232579a0fe41ed5affa131d3623.tar.gz
scm-c7d035ae1a729232579a0fe41ed5affa131d3623.zip
Import Upstream version 5d9upstream/5d9
Diffstat (limited to 'time.c')
-rw-r--r--time.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/time.c b/time.c
index 7cefb94..a57034a 100644
--- a/time.c
+++ b/time.c
@@ -117,6 +117,11 @@
# include <sys/timeb.h>
# define USE_GETTIMEOFDAY
#endif
+#ifdef __NetBSD__
+# include <sys/timeb.h>
+# include <sys/times.h>
+# define USE_GETTIMEOFDAY
+#endif
#ifdef __OpenBSD__
# include <sys/types.h>
# include <sys/time.h>
@@ -352,9 +357,8 @@ SCM your_time()
}
else if ((1 + time_buffer1.time)==time_buffer2.time) ;
else if (cnt < TIMETRIES) goto tryagain;
- else {
- scm_warn("could not read two ftime()s within one second in 10 tries",
- "", UNDEFINED);
+ else { /* could not read two ftime()s within one second in 10 tries */
+ scm_warn("ftime()s too fast", "", MAKINUM(TIMETRIES));
return MAKINUM(-1);
}
tmp = CLKTCK*(time_buffer2.millitm - your_base.millitm);