コード例 #1
0
    private void Sender()
    {
        var sw = new Stopwatch();

        while (IsRunningThread)
        {
            if (gps != null)
            {
                var datastreamToSend = gps.PopData();
                sw.Restart();
                Publish(datastreamToSend);
                sw.Stop();
                gps.SetTransportedTime((float)sw.Elapsed.TotalSeconds);
            }
        }
    }
コード例 #2
0
    private void Sender()
    {
        Stopwatch sw = new Stopwatch();

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

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