title: Measure time with C# (.Net Core)
body: <p>I know this question has been asked more than once, but I'm not sure if the results I'm having are right. The operation seems too fast, so I'd like to double check if that's really it.</p>
  
  <p>I have a routine that splits a string into a <code>List&lt;byte[]&gt;</code>. I wanted to check the time it takes for the operation, so I modified the code to be like the following:</p>
  
  <pre class="lang-cs prettyprint-override"><code>// Deserializes base64 received from POST service
  var str = JsonConvert.DeserializeObject&lt;JsonText&gt;(body).text;
  
  Stopwatch stopWatch = Stopwatch.StartNew();
  
  // parseText is a routine that splits str into
  // byte[] of maximum size 100 and puts them into
  // a List&lt;byte[]&gt; that is then returned 
  commands = DummyClass.parseText(str);
  
  stopWatch.Stop();
  TimeSpan timespan = stopWatch.Elapsed;
  
  Console.WriteLine(timespan.TotalMilliseconds.ToString("0.0###"));
  
  ...
  </code></pre>
  
  <p>I ran the routine using a 8000 character string and expected a couple miliseconds op time, but surprisingly the whole operation runs to at most 0.8ms which I expected to be a whole lot slower.</p>
  
  <p>Am I reading the measurements wrong? Does 0.8 means 8ms? Did I do something wrong while measuring the time?</p>
  
  <p>Thank you very much!</p>