Blog

Posted 2005/04/23

Native Timer for Linux and Windows

This code should be treated as untested - it has only been used in anger as part of my research and I have not put any effort into cleaning it up. Download time.tar.gz then do the following:


mjeg@mrflibble:tmp/$ gzip -d time.tar.gz 
mjeg@mrflibble:tmp/$ tar -xf time.tar 
mjeg@mrflibble:tmp/$ java -Djava.library.path=./timer/ TestTimer
#Making timer
#jni load lib
#jni load lib done
#Native timer online
1.47765188E8

The class will load the correct dynamic library (Linux or Windows) and show that it works. Remember all times are in Microseconds.