static void ShowConnectedClients(object state) { Ticks displayTime = DateTime.UtcNow.Ticks; // Don't show client enumeration more than every two seconds... if ((displayTime - lastDisplayTime).ToSeconds() > 2.0D) { lastDisplayTime = displayTime; publisher.EnumerateClients(); } }