title: Returning Tenths and Hundredth of a Second from a Stopwatch
body: <p>So I'm getting closer and closer to making the timer work the way I want it to, with one small problem.</p>
  
  <p>I found the following post about returning millisecond and nanosecond:
  <a href="https://stackoverflow.com/questions/2329079/how-do-you-convert-stopwatch-ticks-to-nanoseconds-milliseconds-and-seconds">How do you convert Stopwatch ticks to nanoseconds, milliseconds and seconds?</a></p>
  
  <p>But what I'm trying to do is show only the 10ths of 100ths of a second when desired.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>Private Sub TotalTimer_Tick(sender As System.Object, e As System.EventArgs) Handles TotalTimer.Tick
      Dim elapsed As TimeSpan = Me.matchStopwatch.Elapsed
  
      Me.MatchClockLbl.Text = String.Format("{0:0}:{1:00}:{2:00}.{3:###}", _
                                     Math.Floor(elapsed.TotalHours), _
                                     elapsed.Minutes, _
                                     elapsed.Seconds, _
                                     (elapsed.Milliseconds / 100))
  
  End Sub
  </code></pre>
  
  <p>Now I tried to change the part of code from {3:000} to {3:0} or {3:00} but all this does is change format, it doesn't actually remove the 1000ths digit or 1000ths digit, they still show up. </p>
  
  <p>I further found this on the MSDN:</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/ee372287.aspx#fSpecifier" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ee372287.aspx#fSpecifier</a></p>
  
  <p>But I keep getting s.f or s/f or something that's not right.</p>
  
  <p><strong>EDIT:</strong> Added in the modified version of the code, thanks Oded. The new problem now is that the label likes to flicker the extra digits once in a while.</p>