public void NewTask(PTTimePair start, PTTimePair end)
        {
            var task = new SimpleTask(start, end);

            ParallelTasker.AddTask(start, end, task.OnInitialize, task.Execute, task.OnFinalize, m_period);
            PTLogger.Warning($"Added {task}");
            m_tasks.Add(task);
        }
        public void RemoveLastTask()
        {
            var last = m_tasks.Count - 1;

            if (last < 0)
            {
                return;
            }
            var task = m_tasks[last];

            if (!ParallelTasker.RemoveTask(task.Start, task.Execute))
            {
                PTLogger.Error($"Failed to remove task {task}");
            }
            else
            {
                m_tasks.RemoveAt(last);
                PTLogger.Warning($"Removed task {task}");
            }
        }
 public void ClearTasks()
 {
     ParallelTasker.ClearTasks();
     m_tasks.Clear();
     PTLogger.Warning("Cleared all tasks");
 }