Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Metal Typhoon

j/direct question

This topic is 5229 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i''ve looked all over to find how to get the counter''s frequency and ticks using java. When i somehow came across j/direct ... i still dont know what it is .. is it a package ? do i need to download something in order to use it ?? so far i know that i need this.. /** dll.import ("KERNEL32") */ private static native int QueryPerformanceFrequency (int ticks); and then just call the function ? .. by the way .. QueryPerformanceFrequency uses a LARGE_INTEGER.. what would be the conversion of java ?? thx a lot

Share this post


Link to post
Share on other sites
Advertisement
See how it says native? That just means it was coded in a native language. The comment above is just a JavaDoc comment (which I don''t know if it''ll compile right).

I''ve never worked with native methods, so sorry I can''t be of much help.

PS - Your Java application will no longer be portable since this method is native (specific to the OS).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hmmm, I thought that was the syntax used by the MS Java to import libraries actually

Share this post


Link to post
Share on other sites
quote:
Original post by yaroslavd
See how it says native? That just means it was coded in a native language. The comment above is just a JavaDoc comment (which I don''t know if it''ll compile right).

I''ve never worked with native methods, so sorry I can''t be of much help.

PS - Your Java application will no longer be portable since this method is native (specific to the OS).


it compiles right.. just with the first two lines.. if u call the function.. it will give an error

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!