Advertisement
RuiViana

Untitled

May 2nd, 2015
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. // Medidor de tempo de códigos
  2. long Told, Tgasto, Tnew;
  3.  
  4. void setup()
  5. {
  6. Serial.begin(9600);
  7. }
  8.  
  9. void loop()
  10. {
  11. Told = micros();
  12. // Coloque entre estas linhas o código para medir o tempo
  13.  
  14. //
  15. Tnew = micros();
  16. Tgasto = Tnew - Told;
  17. Serial.println(Tgasto);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement