edu.rit.util
Class Platform

java.lang.Object
  extended by edu.rit.util.Platform

public class Platform
extends Object

Class Platform provides operations for accessing platform-dependent information.


Method Summary
static int getProcessID()
          Returns the process ID of the current process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProcessID

public static int getProcessID()
Returns the process ID of the current process.

Implementation Note: The Java platform does not at present have a method for getting the process ID of the current process. To avoid having to write a platform-dependent native method, class Platform takes a snapshot of the system clock when the process starts up and uses the low-order 31 bits of that as the "process ID." The likelihood is small that two processes on the same device will get the same process ID in this way.



Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.