Пример #1
0
    private void Sender()
    {
        var sw = new Stopwatch();

        while (IsRunningThread)
        {
            if (cam != null)
            {
                var datastreamToSend = cam.PopData();
                sw.Restart();
                Publish(datastreamToSend);
                sw.Stop();
                cam.SetTransportedTime((float)sw.Elapsed.TotalSeconds);
            }
        }
    }
    private void Sender()
    {
        Stopwatch sw = new Stopwatch();

        while (true)
        {
            if (cam == null)
            {
                continue;
            }

            var datastreamToSend = cam.PopData();
            sw.Restart();
            Publish(datastreamToSend);
            sw.Stop();
            cam.SetTransportTime((float)sw.Elapsed.TotalSeconds);
        }
    }