Sign in to follow this  

Java Gettiks?

This topic is 4304 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

What is the class with java that let me get the time sicne the program has started? Like the SDL_GetTicks() I can't find it in the gazilion of class in the java doc :( Thank

Share this post


Link to post
Share on other sites
I'm not aware of anything built in that allows this, but a simple way is just to record the time when your program started (using either System.currentTimeMillis() or System.nanoTime()) and then just compare it with the current time (again, using one of those methods) to get the execution time.

Share this post


Link to post
Share on other sites
Sign in to follow this