How long does Serial.print(char*) take?

as title :) I want to know how many millis are needed for a Serial.print for one char. Regards,


At what serial rate?

It would probably be easiest to read millis() before and after the print, then subtract.


About 10 seconds divided by the baud rate, per character. If you can't afford to wait that long, it's possible to program the UART to transmit from a buffer using interrupts. I have heard that the Arduino 1.0 software (available now as a beta) does this as standard.

Even with the present software, if you write just one character to Serial and the previous character has already been fully transmitted, the call should return more or less immediately because the character will just be written to the UART's transmit register.

Somewhat indeterminate. As others have said. About 10s/baudrate in the "steady state." However, there is one byte of buffering in the hardware, so the very first byte output will return much more quickly. In 1.0, there is a larger software output buffer, so the first 64 bytes of calls to Serial.print() may return quickly. ("First" means any output after a significant pause.) (the 1.0 situation is a bit fluid. There have been complaints about the new buffering strategy, and I guess it is still subject to change.)

Thanks you everybody :)