How create a timeout Thread on Program.cs
Posted: Wed May 19, 2010 11:03 am
Hello!
I need some help, i need to receive by argument a timeout on Program.cs create a thread call a method and start the time. When the timeout ends i need to do this Report.Error("timeout"); and Report.End();
my code is :
public static int Main(string[] args)
{
string logFileName = args[1];
//receive the timeout here by argument and convert to int(milliseconds)
Report.Setup(ReportLevel.Info, logFileName, true); try{ Recording1.Setup(args);
//create here the thread and start the timeout, when timeout finish close the method and make Report.Error("timeout"); and Report.End();
Recording1.Start();
I need some help, i need to receive by argument a timeout on Program.cs create a thread call a method and start the time. When the timeout ends i need to do this Report.Error("timeout"); and Report.End();
my code is :
public static int Main(string[] args)
{
string logFileName = args[1];
//receive the timeout here by argument and convert to int(milliseconds)
Report.Setup(ReportLevel.Info, logFileName, true); try{ Recording1.Setup(args);
//create here the thread and start the timeout, when timeout finish close the method and make Report.Error("timeout"); and Report.End();
Recording1.Start();