public void DoWork(uint timeElaspedMs)
{
m_workCountDown -= (int)timeElaspedMs;
if(m_workCountDown < 0 && !m_isRunning)
{
// Reset work count down
m_workCountDown = GLOW_SERVER_DISCOVER_INTERVAL_MS;
// Kick off a thread to work in the background
if(m_mode == DiscoveryMode.Broadcast)
{
m_isRunning = true;
new Task(SendBroadcast).Start();
}
}
}