Let benchmark.report_stats/0 report real times on POSIX platforms.

Estimated hours taken: 1
Branches: main

Let benchmark.report_stats/0 report real times on POSIX platforms.

configure.in:
	Check for time.h and gettimeofday().

runtime/mercury_conf.h.in:
	Add MR_HAVE_TIME_H, MR_HAVE_GETTIMEOFDAY.

	Unrelated change: add MR_HAVE_PTHREAD_H.

runtime/mercury_timing.c:
runtime/mercury_timing.h:
	Add `MR_get_real_milliseconds'.

runtime/mercury_wrapper.c:
runtime/mercury_wrapper.h:
	Rename MR_time_* globals to MR_user_time_*.

	Add and initialise MR_real_time_* globals.

library/benchmarking.m:
	Output real times in ML_report_stats().

	Correct spelling of milliseconds.

java/runtime/Native.c:
java/runtime/Native.java.in:
trace/mercury_trace_declarative.c:
	Correct spelling of milliseconds.
This commit is contained in:
Peter Wang
2006-08-07 06:21:32 +00:00
parent e12ca34b2a
commit 8396edc4b2
10 changed files with 110 additions and 59 deletions

View File

@@ -1,6 +1,6 @@
// @configure_input@
//
// Copyright (C) 2004 The University of Melbourne.
// Copyright (C) 2004, 2006 The University of Melbourne.
// This file may only be copied under the terms of the GNU Library General
// Public License - see the file COPYING.LIB in the Mercury distribution.
//
@@ -138,10 +138,10 @@ public class Native {
public static native int clk_tck();
/*
** get_user_cpu_miliseconds():
** get_user_cpu_milliseconds():
** Native method to return the CPU time consumed by the process,
** in miliseconds, from an arbitrary initial time.
** in milliseconds, from an arbitrary initial time.
*/
public static native int get_user_cpu_miliseconds();
public static native int get_user_cpu_milliseconds();
}