private void mainThread()
{
while (running)
{
if (sw.ElapsedMilliseconds >= 1000)
{
sw.Restart();
if (currentCommand != null)
{
Thread newThread = new Thread(new
ThreadStart(this.sendCommandThread));
newThread.Start();
}
else
{
Console.WriteLine("Command Empty! Use setCommand!");
}
}
}
}