Java Gettiks?

Started by
2 comments, last by haegarr 18 years ago
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
Advertisement
System.currentTimeMillis() ?
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.
AFAIK there is no such method (time relative to start-up) available from the core library.

This topic is closed to new replies.

Advertisement