# HG changeset patch # User John W. Eaton # Date 1262903178 18000 # Node ID dcde57cb5778a61de4af3bc053a3d2827ec032ae # Parent 0b0bf1fd1ed72b01b3af2c99dd4047f13919196e use times module from gnulib diff -r 0b0bf1fd1ed7 -r dcde57cb5778 ChangeLog --- a/ChangeLog Thu Jan 07 16:43:48 2010 -0500 +++ b/ChangeLog Thu Jan 07 17:26:18 2010 -0500 @@ -1,3 +1,8 @@ +2010-01-07 John W. Eaton + + * configure.ac: Don't check for times. + * bootstrap.conf (gnulib_modules): Include times in the list. + 2010-01-07 John W. Eaton * configure.ac: Don't check for gettimeofday, or whether diff -r 0b0bf1fd1ed7 -r dcde57cb5778 bootstrap.conf --- a/bootstrap.conf Thu Jan 07 16:43:48 2010 -0500 +++ b/bootstrap.conf Thu Jan 07 17:26:18 2010 -0500 @@ -27,6 +27,7 @@ mkfifo stat strftime + times " # Additional xgettext options to use. Use "\\\newline" to break lines. diff -r 0b0bf1fd1ed7 -r dcde57cb5778 configure.ac --- a/configure.ac Thu Jan 07 16:43:48 2010 -0500 +++ b/configure.ac Thu Jan 07 17:26:18 2010 -0500 @@ -1677,7 +1677,7 @@ ### A system dependent kluge or two. -AC_CHECK_FUNCS(getrusage times) +AC_CHECK_FUNCS(getrusage) case "$canonical_host_type" in *-*-cygwin*) AC_DEFINE(RUSAGE_TIMES_ONLY, 1, [Define if your struct rusage only has time information.]) diff -r 0b0bf1fd1ed7 -r dcde57cb5778 src/ChangeLog --- a/src/ChangeLog Thu Jan 07 16:43:48 2010 -0500 +++ b/src/ChangeLog Thu Jan 07 17:26:18 2010 -0500 @@ -1,3 +1,7 @@ +2010-01-07 John W. Eaton + + * data.cc (cputime): Eliminate Windows-specific code. + 2010-01-07 John W. Eaton * variables.cc (get_global_value): Fix function name in error message. diff -r 0b0bf1fd1ed7 -r dcde57cb5778 src/data.cc --- a/src/data.cc Thu Jan 07 16:43:48 2010 -0500 +++ b/src/data.cc Thu Jan 07 17:26:18 2010 -0500 @@ -5700,18 +5700,6 @@ sys = static_cast (seconds) + static_cast(fraction) / static_cast(HZ); -#elif defined (__WIN32__) - - HANDLE hProcess = GetCurrentProcess (); - FILETIME ftCreation, ftExit, ftUser, ftKernel; - GetProcessTimes (hProcess, &ftCreation, &ftExit, &ftKernel, &ftUser); - - int64_t itmp = *(reinterpret_cast (&ftUser)); - usr = static_cast (itmp) * 1e-7; - - itmp = *(reinterpret_cast (&ftKernel)); - sys = static_cast (itmp) * 1e-7; - #endif retval (2) = sys;