net.vattp.security
Class Native

java.lang.Object
  |
  +--net.vattp.security.Native

class Native
extends Object

A class to hold all the miscellaneous system-dependent utilities Microcosm might need.

Author:
Walendo

Field Summary
private static boolean isLinked
           
private static java.text.DecimalFormat myDecimalFormat
           
 
Constructor Summary
(package private) Native()
           
 
Method Summary
static long deltaTimerMSec(long start)
           
static long deltaTimerMSec(long start, long end)
           
static long deltaTimerSec(long start)
           
static long deltaTimerSec(long start, long end)
           
static long deltaTimerUSec(long start)
           
static long deltaTimerUSec(long start, long end)
           
private static int flushWorkingSet()
          Set the working set of this process to 0.
static String format(long time)
          Return a long in a preformatted way, suitable for sorting.
static String formatNow()
          Return the time in a preformatted way, suitable for sorting.
private static Object fromWeakCell(int weakcell)
           
static int getPhysicalMemorySize()
           
private static int getPhysicalMemorySizeNative()
           
private static void initializeTimer()
          Initialize the high-res timer.
private static long queryPerformanceCounter()
          Get the current value of the Pentium Performance counter.
private static long queryTimer()
          Get the current value of the high-res timer in microseconds.
private static int toWeakCell(Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isLinked

private static boolean isLinked

myDecimalFormat

private static final java.text.DecimalFormat myDecimalFormat
Constructor Detail

Native

Native()
Method Detail

deltaTimerMSec

public static long deltaTimerMSec(long start)

deltaTimerMSec

public static long deltaTimerMSec(long start,
                                  long end)

deltaTimerSec

public static long deltaTimerSec(long start)

deltaTimerSec

public static long deltaTimerSec(long start,
                                 long end)

deltaTimerUSec

public static long deltaTimerUSec(long start)

deltaTimerUSec

public static long deltaTimerUSec(long start,
                                  long end)

flushWorkingSet

private static int flushWorkingSet()
Set the working set of this process to 0. This causes the OS to reload pages as they're touched. Only for NT/95.


format

public static String format(long time)
Return a long in a preformatted way, suitable for sorting.


formatNow

public static String formatNow()
Return the time in a preformatted way, suitable for sorting.


fromWeakCell

private static Object fromWeakCell(int weakcell)

getPhysicalMemorySize

public static int getPhysicalMemorySize()

getPhysicalMemorySizeNative

private static int getPhysicalMemorySizeNative()

initializeTimer

private static void initializeTimer()
Initialize the high-res timer.


queryPerformanceCounter

private static long queryPerformanceCounter()
Get the current value of the Pentium Performance counter.

Returns:
the current value of the Pentium Performance counter.

queryTimer

private static long queryTimer()
Get the current value of the high-res timer in microseconds.

Returns:
the current value of the high-res timer in microseconds.

toWeakCell

private static int toWeakCell(Object obj)


comments?