Add a defined integer to a running total every millisecond

edited June 2014 in How To...


How would you recommend I create a running total that adds a pre-defined integer every millisecond? The result would be similar to this in its function.

Hope this is an easy one to solve, I'm not sure what would be the best solution.

Thank you


  • Answer ✓
    int number = 2;
    println( millis() * number );
  • Every millisecond? That's a much finer granularity than what you show... Perhaps you meant every second...

    I suggest to search from the main site about countdown counters or similar.

  • The solution suggested by TfGuy44 seems to work well, thank you.

Sign In or Register to comment.