OSDN Git Service

Modify its project name.
[nxt-jsp/etrobo-atk.git] / nxtOSEK / lejos_nxj / src / java / classes / java / lang / System.java
1 package java.lang;
2
3 /**
4  * System utilities.
5  */
6 public final class System
7 {
8   private System() {}
9   
10   /**
11    * Copies one array to another.
12    */
13   //public static native void arraycopy (Object src, int srcOffset, Object dest, int destOffset, int length);
14   static void arraycopy (char[] src, int srcOffset, char[] dest, int destOffset, int length)
15   {
16     for (int i = 0; i < length; i++)
17       dest[i + destOffset] = src[i + srcOffset]; 
18   }
19
20   /**
21    * Terminate the application.
22    */
23   public static native void exit(int code);
24     
25   /**
26    * Current time expressed in milliseconds. In the RCX, this is the number
27    * of milliseconds since the RCX has been on. (In Java, this would
28    * be since January 1st, 1970).
29    */
30   public static native long currentTimeMillis();
31   
32   /**
33    * Get the singleton instance of Runtime.
34    */
35   public static Runtime getRuntime() {
36         return Runtime.getRuntime();
37   }
38 }
39