# HG changeset patch # User jwe # Date 781980515 0 # Node ID ac49764105cfdaf9b4267d1f59563de243cb4929 # Parent 29bc04411213b5f196af2e67ee2dd26723f3ba57 [project @ 1994-10-12 16:45:59 by jwe] diff -r 29bc04411213 -r ac49764105cf configure.in --- a/configure.in Wed Oct 12 15:40:22 1994 +0000 +++ b/configure.in Wed Oct 12 16:48:35 1994 +0000 @@ -21,7 +21,7 @@ dnl along with Octave; see the file COPYING. If not, write to the Free dnl Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. dnl -AC_REVISION($Revision: 1.56 $)dnl +AC_REVISION($Revision: 1.57 $)dnl AC_PREREQ(1.8)dnl AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h kpathsea/c-auto.h) @@ -512,6 +512,7 @@ AC_HAVE_HEADERS(sys/utsname.h sys/time.h sys/fcntl.h)dnl AC_HAVE_HEADERS(sys/ttold.h sys/ptem.h sys/select.h)dnl AC_DIR_HEADER +AC_TIME_WITH_SYS_TIME dnl dnl Use sgtty on Ultrix so that using DEC Migrate to convert a Mips dnl binary to an Alpha binary will work. @@ -543,7 +544,7 @@ dnl AC_HAVE_FUNCS(setvbuf getcwd gethostname bzero rindex vfprintf vsprintf)dnl AC_HAVE_FUNCS(stricmp strnicmp strcasecmp strncasecmp strerror)dnl -AC_HAVE_FUNCS(atexit on_exit tempnam memmove putenv)dnl +AC_HAVE_FUNCS(atexit on_exit tempnam memmove putenv gettimeofday)dnl dnl dnl Check to see if we have IEEE math functions, and if so, which ones. dnl diff -r 29bc04411213 -r ac49764105cf src/timefns.cc --- a/src/timefns.cc Wed Oct 12 15:40:22 1994 +0000 +++ b/src/timefns.cc Wed Oct 12 16:48:35 1994 +0000 @@ -25,12 +25,11 @@ #include "config.h" #endif -#include - #include "dMatrix.h" #include "tree-const.h" #include "oct-obj.h" +#include "systime.h" #include "defun.h" DEFUN ("clock", Fclock, Sclock, 1, 0, @@ -40,8 +39,17 @@ { time_t now; struct tm *tm; + double fraction = 0.0; +#ifdef HAVE_GETTIMEOFDAY + struct timeval tp; + gettimeofday (&tp, 0); + now = tp.tv_sec; + fraction = tp.tv_usec / 1e6; +#else time (&now); +#endif + tm = localtime (&now); Matrix m (1, 6); @@ -50,7 +58,7 @@ m.elem (0, 2) = tm->tm_mday; m.elem (0, 3) = tm->tm_hour; m.elem (0, 4) = tm->tm_min; - m.elem (0, 5) = tm->tm_sec; + m.elem (0, 5) = tm->tm_sec + fraction; return m; } diff -r 29bc04411213 -r ac49764105cf src/toplev.h --- a/src/toplev.h Wed Oct 12 15:40:22 1994 +0000 +++ b/src/toplev.h Wed Oct 12 16:48:35 1994 +0000 @@ -71,6 +71,9 @@ // If nonzero, don't do fancy line editing. extern int no_line_editing; +// If nonzero, print verbose info in some cases. +extern int verbose_flag; + // Command number, counting from the beginning of this session. extern int current_command_number;