title: Strange behavior with println and System.currentTimeMillis
body: <p>I run the following code:</p>
  
  <pre><code>object Main {
    def main(args: Array[String]) = {
      {
        val start = System.currentTimeMillis
        println("took " + (System.currentTimeMillis - start) + " ms")
      }
      {
        val start = System.currentTimeMillis
        val took = System.currentTimeMillis - start
        println(s"took $took ms")
      }
    }
  }
  </code></pre>
  
  <p>and it gives:</p>
  
  <pre><code>took 246 ms
  took 0 ms
  </code></pre>
  
  <p>But if I swap two blocks, then I get</p>
  
  <pre><code>took 0 ms
  took 0 ms
  </code></pre>
  
  <p>Why is it so?</p>