using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
test a = new test(0, 5);
}
}
public class test
{
private System.Threading.Thread th;
public test(int stopm,int stops)
{
System.Threading.ParameterizedThreadStart pts = new System.Threading.ParameterizedThreadStart(t);
th = new System.Threading.Thread(pts);
th.Start(new List<int>() { 0,2});
}
private void t(object parm)
{
int sm, ss;
sm = ss = 0;
List<int> p = parm as List<int>;
while (true)
{
ss++;
if (ss == 60)
{
sm++;
}
if (sm ==p[0] && ss == p[1])
{
break;
}
System.Threading.Thread.Sleep(1000);
}
Console.WriteLine("Done");
}
}
}