title: Arduino Serial.print() optimization
body: <pre><code>unsigned long current_millis_value = 0;
  unsigned long previous_millis_value = 0;
  unsigned long m = 0;
  unsigned int seconds = 0;
  unsigned int minutes = 0;
  unsigned int hours = 0;
  
  unsigned long clockTimeStart = 1800000; //30 Minutes
  unsigned long currentClockTime;
  
  void loop() {
      current_millis_value = millis();
      currentClockTime -= current_millis_value - previous_millis_value;
      previous_millis_value = current_millis_value;
  
      minutes = (currentClockTime / 1000 / 60);
      seconds = (currentClockTime / 1000) % 60;
      m = (currentClockTime % 100);
  
      Serial.print(minutes);
      Serial.print(":");
      Serial.print(seconds);
      Serial.print(":");
      Serial.println(m);
  }
  </code></pre>
  
  <p>I'm getting a gap in times between serial writes of anywhere from 9-11 ms per serial line written. Is there a way to optimize the <code>Serial.print()</code> method to allow writing of multiple values across types of long and String values?</p>
  
  <p>Example (this is not valid but along the lines of what I'm thinking):</p>
  
  <pre><code>Serial.print(minutes + ":" + seconds + ":" + m);
  </code></pre>
  
  <p>I know this isn't JavaScript I'm working in - just looking for optimization possibilities for the writing process. I know that MOD can be expensive but just doing the simple subtraction and writing out the value of <strong>currentClockTime</strong> leaves me with a gap time of 6-7 ms.</p>