* times.cc (GetSystemTimePreciseAsFileTime): Add comment to declaration.

(__to_clock_t): Remove a debug_printf.
	(times): Align syscall_printf to debug output of other system calls.
This commit is contained in:
Corinna Vinschen 2013-06-17 08:33:41 +00:00
parent 2e72b72fcc
commit f4ddbb8ebf
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2013-06-17 Corinna Vinschen <corinna@vinschen.de>
* times.cc (GetSystemTimePreciseAsFileTime): Add comment to declaration.
(__to_clock_t): Remove a debug_printf.
(times): Align syscall_printf to debug output of other system calls.
2013-06-14 Corinna Vinschen <corinna@vinschen.de> 2013-06-14 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (GetSystemTimePreciseAsFileTime): Define. * autoload.cc (GetSystemTimePreciseAsFileTime): Define.

View File

@ -31,6 +31,7 @@ hires_ms NO_COPY gtod;
hires_ns NO_COPY ntod; hires_ns NO_COPY ntod;
/* Temporary declare here until 32 bit w32api follows suit. */
extern "C" { void WINAPI GetSystemTimePreciseAsFileTime (LPFILETIME); } extern "C" { void WINAPI GetSystemTimePreciseAsFileTime (LPFILETIME); }
static inline void __attribute__ ((always_inline)) static inline void __attribute__ ((always_inline))
@ -51,7 +52,6 @@ __to_clock_t (PLARGE_INTEGER src, int flag)
total -= FACTOR; total -= FACTOR;
total /= NSPERSEC / CLOCKS_PER_SEC; total /= NSPERSEC / CLOCKS_PER_SEC;
debug_printf ("total %016X", total);
return total; return total;
} }
@ -81,9 +81,6 @@ times (struct tms *buf)
/* ticks is in in 100ns, convert to clock ticks. */ /* ticks is in in 100ns, convert to clock ticks. */
clock_t tc = (clock_t) (ticks.QuadPart * CLOCKS_PER_SEC / NSPERSEC); clock_t tc = (clock_t) (ticks.QuadPart * CLOCKS_PER_SEC / NSPERSEC);
syscall_printf ("ticks %D, CLOCKS_PER_SEC %d", ticks, CLOCKS_PER_SEC);
syscall_printf ("UserTime %D, KernelTime %D, CreationTime %D, ExitTime %D",
kut.UserTime, kut.KernelTime, kut.CreateTime, kut.ExitTime);
buf->tms_stime = __to_clock_t (&kut.KernelTime, 0); buf->tms_stime = __to_clock_t (&kut.KernelTime, 0);
buf->tms_utime = __to_clock_t (&kut.UserTime, 0); buf->tms_utime = __to_clock_t (&kut.UserTime, 0);
timeval_to_filetime (&myself->rusage_children.ru_stime, &kut.KernelTime); timeval_to_filetime (&myself->rusage_children.ru_stime, &kut.KernelTime);
@ -91,6 +88,7 @@ times (struct tms *buf)
timeval_to_filetime (&myself->rusage_children.ru_utime, &kut.UserTime); timeval_to_filetime (&myself->rusage_children.ru_utime, &kut.UserTime);
buf->tms_cutime = __to_clock_t (&kut.UserTime, 1); buf->tms_cutime = __to_clock_t (&kut.UserTime, 1);
syscall_printf ("%D = times(%p)", tc, buf);
return tc; return tc;
} }