diff liboctave/util/kpse.cc @ 22061:737b1d9d7ee3

use octave::sys::time instead of C library time function * graphics.cc, kpse.cc: Use octave::sys::time instead of calling C library time function directly. * bootstrap.conf: Drop unneeded time and times modules from list (octave::sys::time uses gettimeofday instead of calling time).
author John W. Eaton <jwe@octave.org>
date Thu, 07 Jul 2016 08:42:44 -0400
parents d04da18a407a
children b017351e92e1
line wrap: on
line diff
--- a/liboctave/util/kpse.cc	Thu Jul 07 15:21:00 2016 +0200
+++ b/liboctave/util/kpse.cc	Thu Jul 07 08:42:44 2016 -0400
@@ -33,7 +33,6 @@
 #include <cctype>
 #include <cerrno>
 #include <cstdlib>
-#include <ctime>
 
 #include <map>
 #include <fstream>
@@ -46,6 +45,7 @@
 #include "kpse.h"
 #include "oct-env.h"
 #include "oct-passwd.h"
+#include "oct-time.h"
 #include "pathsearch.h"
 #include "unistd-wrappers.h"
 
@@ -264,7 +264,10 @@
   if (KPSE_DEBUG_P (KPSE_DEBUG_SEARCH))
     {
       for (const auto &filename : filenames)
-        std::cerr << time (0) << " " << filename << std::endl;
+        {
+          octave::sys::time now;
+          std::cerr << now.unix_time () << " " << filename << std::endl;
+        }
     }
 }