   Timing In Java?
  How do we get the tick count of the cpu so we delay for a couple of seconds in Java. GetTickCount() in windows C returns milliseconds if i'm right.So what function with what imports do it in Java?Thanks.Dave   
  See here for currentTimeMillis, or if you need higher accuracy, nanoTime (although that can  hit your performance depending on how often you use it.) There are also some 3rd party hi-res timers if you need both accuracy and speed, such as the one in LWJGL (I forget its name.)You don't need to import anything for the 2 above, just use System.currentTimeMillis() or System.nanoTime()   ;  You can also use the undocumented and unsupported sun.misc.Perf timer. private static sun.misc.Perf perf;perf = sun.misc.Perf.getPerf();...freq = perf.highResFrequency();time = perf.highResCounter() * 1000 / freq;But if you just want to delay, something like sleep(10) ought to do it, depending on what exactly you want to accomplish.   