I tried the following code:
p = StartProcess("some_process.exe");
DateTime startTime = DateTime.Now;
p.Start();
while (!p.HasExited)
{
executeTime = (DateTime.Now - startTime).Milliseconds;
if (executeTime > 10000) // 10 seconds
{
Console.Write("Test \"" + inputTest + "\" failed: takes more than 10 seconds");
break;
}
}
but it doesn't work.
Is it possible to do that?