Absolute newbie question

Started by HiddenKrypt, March 08, 2010, 18:27:06

Previous topic - Next topic

HiddenKrypt

Hello.  I am looking to use the lwjgl, and I am having trouble getting started.  I downloaded it, and unzipped it (currently in c:/lwjgl-2.3/)  I don't know how to proceed from here.  I followed the "test" for windows at http://lwjgl.org/installation.php.
Now what do I need to do to start using the library in my programs?


For reference:
I have a bit of java experience, and I am working on a project that needs a 1ms resolution timer.  I know that System.currentTimeMillis() does not get this resolution on many systems.  I have also figured out that System.nanoTime() is very unreliable on multicore processors.  I heard about lwjgl when someone suggested that I use it to get around the problems I've been having with the standard java library. This isn't a "game" per se, and most of the rest of the code has already been written.  The program I need the timing for basically asks a set of questions of the user, and records the answer as well as how many milliseconds it took them to complete. This program is going to be used for a study being done by the Psychology department at my university, thus I need reliable accuracy.

Thank you for your help.

Evil-Devil

When its only about the timer I doubt that LWJGL is the right api for your project. The timer in lwjgl is set to an absolut value of 1ms so it won't rely on curentTimeMillis() and others.

delt0r

In fact your best solution is to write a small JNI for your own timer calls. But be warned, you may have the same problems. People often misunderstand the idea of a clock, and the clocks value and when you *use* that value, in a multi core, multi threaded preemptive environment.

What do you need it for? I have found System.nanoTime() is much better than 1ms on our 16 core machine at work or my dual core machines at home. Going down to 1microsecond is going to be problematic regardless of what you do without a little hardware magic.(Think about scheduled time slices per thread...)
If you want a plot read a book and leave Hollywood out of it.