Skip to content

Commit

Permalink
Added a --Timeout command line option to stop the process
Browse files Browse the repository at this point in the history
  • Loading branch information
spaghettidba committed Jul 27, 2022
1 parent 20cc46a commit e51e35c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion XESmartTarget/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private static void ProcessTarget(Options options)
Task t = processTargetAsync(targ);
tasks.Add(t);
}
Task.WaitAll(tasks.ToArray());
Task.WaitAll(tasks.ToArray(),options.TimeoutSeconds > 0 ? options.TimeoutSeconds * 1000 : -1);
}
else
{
Expand Down Expand Up @@ -219,5 +219,8 @@ class Options

[Option('L', "LogFile", HelpText = "Log File")]
public string LogFile { get; set; }

[Option('T', "Timeout", HelpText = "Timeout in seconds")]
public int TimeoutSeconds { get; set; } = -1;
}
}

0 comments on commit e51e35c

Please sign in to comment.