I have problems with timer. I have function in function (draw in func)
void func(){
/*...do something ... */
for(){
for() {
/*loop*/
draw(A,B, Pen);
I'm not entirely clear on what you're trying to do, but, in general, you can use an object of the Timer class to specify code to be executed on a specified interval. The code would look something like this:
Timer myTimer = new Timer();
myTimer.Elapsed += new ElapsedEventHandler(DisplayTimeEvent);
myTimer.Interval = 1000; // 1000 ms is one second
myTimer.Start();
public static void DisplayTimeEvent(object source, ElapsedEventArgs e)
{
// code here will run every second
}