title: How to time Java program execution using Intellij Idea?
body: <ul>
  <li>In Intellij IDEA it is possible to create run configurations. When I run a Java program and it completes execution then Intellij IDEA console shows something like this at the end
  
  <blockquote>
    <p>Process finished with exit code 0/1</p>
  </blockquote></li>
  <li>We have a unix command <code>time</code> which can be used for timing something. If I want to time a java command execution via command line then I can do something like
  
  <blockquote>
    <p>time java -version</p>
  </blockquote></li>
  <li>We have a option of adding external tools in Intellij's run configuration. By default it has <code>make</code> for compiling configured</li>
  </ul>
  
  <p>Now I was thinking that I can possibly add the timing part to my run configurations. But the problem is that the external tools run before the actual execution.</p>
  
  <p>I tried and added external tool <code>time</code> but it gave an error that no arguments were given. </p>
  
  <p>Is it possible to wrap the java command's execution into the time like the example given above via Intellij's run configurations? Finally I want to time the java command's execution without changing the code itself. I am open to solutions other than linux <code>time</code> subject to they can be used with IDEA's run configurations.</p>