[Solved] Increment variable by X every second [closed]
[ad_1] Do you want to make it single-threaded? int i = 0; while (i < max) { i++; Thread.Sleep(x); // in milliseconds } or multi-threaded: static int i = 0; // class scope var timer = new Timer { Interval = x }; // in milliseconds timer.Elapsed += (s,e) => { if (++i > max) … Read more