title: Why does `time.Since(start).Seconds()` always return 0?
body: <p>I am on the first chapter <a href="https://rads.stackoverflow.com/amzn/click/com/0134190440" rel="nofollow noreferrer" rel="nofollow noreferrer">The Go Programming Language (Addison-Wesley Professional Computing Series)</a> and the 3rd exercise in the book asks me to measure code performance using <code>time</code>.</p>
  
  <p>So, I came up with the following code.</p>
  
  <pre class="lang-golang prettyprint-override"><code>start := time.Now()
  var s, sep string
  for i := 1; i &lt; len(os.Args); i++ {
      s += sep + os.Args[i]
      sep = " "
  }
  fmt.Print(s)
  fmt.Printf("\nTook %.2fs \n", time.Since(start).Seconds())
  fmt.Println("------------------------------------------------")
  start2 := time.Now()
  fmt.Print(strings.Join(os.Args[1:], " "))
  fmt.Printf("\nTook %.2fs", time.Since(start2).Seconds())
  </code></pre>
  
  <p>When I ran this code on Windows and Mac, it always return 0.00 second. I added a pause in my code to check whether it's correct and it seems fine. What I don't understand is why it always returns 0.0.</p>