aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-01-24 11:29:00 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 11:02:41 +1000
commitb0950211281e786a633692eee2a4096e8457ed82 (patch)
tree8ad2522e8955e7e68e77441b0159e302cade583d
parent2eb26d60cb02bab06d6ebe49bf40e0765e3a4d67 (diff)
downloadjimtcl-b0950211281e786a633692eee2a4096e8457ed82.zip
jimtcl-b0950211281e786a633692eee2a4096e8457ed82.tar.gz
jimtcl-b0950211281e786a633692eee2a4096e8457ed82.tar.bz2
Fix time, bump version
time should return wall time, not cpu time (Tcl compatible) Bump version to 0.61 ------------------------------------------------------------------------
-rwxr-xr-xconfigure18
-rw-r--r--configure.ac2
-rw-r--r--jim.c11
3 files changed, 18 insertions, 13 deletions
diff --git a/configure b/configure
index 54bebf7..f2f0110 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for jim 0.60.
+# Generated by GNU Autoconf 2.64 for jim 0.61.
#
# Report bugs to <steveb@workware.net.au>.
#
@@ -548,8 +548,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='jim'
PACKAGE_TARNAME='jim'
-PACKAGE_VERSION='0.60'
-PACKAGE_STRING='jim 0.60'
+PACKAGE_VERSION='0.61'
+PACKAGE_STRING='jim 0.61'
PACKAGE_BUGREPORT='steveb@workware.net.au'
PACKAGE_URL=''
@@ -1173,7 +1173,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures jim 0.60 to adapt to many kinds of systems.
+\`configure' configures jim 0.61 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1238,7 +1238,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of jim 0.60:";;
+ short | recursive ) echo "Configuration of jim 0.61:";;
esac
cat <<\_ACEOF
@@ -1329,7 +1329,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-jim configure 0.60
+jim configure 0.61
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1497,7 +1497,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by jim $as_me 0.60, which was
+It was created by jim $as_me 0.61, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -3407,7 +3407,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by jim $as_me 0.60, which was
+This file was extended by jim $as_me 0.61, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3458,7 +3458,7 @@ Report bugs to <steveb@workware.net.au>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-jim config.status 0.60
+jim config.status 0.61
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index d3ca0bd..4fd915d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
-AC_INIT([jim], [0.60], [steveb@workware.net.au])
+AC_INIT([jim], [0.61], [steveb@workware.net.au])
# Checks for programs.
AC_PROG_CC
diff --git a/jim.c b/jim.c
index 67c527e..1f7ac3f 100644
--- a/jim.c
+++ b/jim.c
@@ -98,6 +98,11 @@
#endif /* WIN32 */
#endif /* JIM_DYNLIB */
+#ifndef WIN32
+#include <unistd.h>
+#include <sys/time.h>
+#endif
+
#ifdef __ECOS
#include <cyg/jimtcl/jim.h>
#else
@@ -630,9 +635,9 @@ static jim_wide JimClock(void)
QueryPerformanceCounter(&t);
return (long)((t.QuadPart * 1000000) / f.QuadPart);
#else /* !WIN32 */
- clock_t clocks = clock();
-
- return (long)(clocks*(1000000/CLOCKS_PER_SEC));
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return (jim_wide)tv.tv_sec*1000000 + tv.tv_usec;
#endif /* WIN32 */
}