Implement some library procedures for the Java back-end.

Estimated hours taken: 2
Branches: main

Implement some library procedures for the Java back-end.

library/time.m:
	Implement c_clk_tck/0 for Java.  Also changed the C implementation to
	use the same macro as that used in Native.c.

java/runtime/Native.java.in:
	Add new function clk_tck() to be called by c_clk_tck/0.

java/runtime/Native.c:
	Add corresponding implementation for clk_tck().
This commit is contained in:
James Goddard
2004-02-12 02:24:35 +00:00
parent 4581942e06
commit 1abb7c2bfa
3 changed files with 40 additions and 8 deletions

View File

@@ -128,6 +128,15 @@ public class Native {
*/
public static native int[] times();
/*
** clk_tck():
** Returns the number of "clock ticks" per second as defined by
** sysconf(_SC_CLK_TCK). A `clock_t' value returned by
** 'times()' can be divided by this value to obtain a time in
** seconds.
*/
public static native int clk_tck();
/*
** get_user_cpu_miliseconds():
** Native method to return the CPU time consumed by the process,