コード例 #1
0
            public virtual void run()
            {
                if (18 <= msg_count)
                {
                    outerInstance.setReceiverEndTime(InterfaceName, Node, DateTimeHelperClass.CurrentUnixTimeMillis());
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final long totalTime = getReceiverEndTime(InterfaceName, Node) - getReceiverStartTime(InterfaceName, Node);
                    long totalTime = outerInstance.getReceiverEndTime(InterfaceName, Node) - outerInstance.getReceiverStartTime(InterfaceName, Node);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int loss = getReceiverLossPer(InterfaceName, Node, getTotalMsgRecvd(InterfaceName, Node));
                    int loss = outerInstance.getReceiverLossPer(InterfaceName, Node, outerInstance.getTotalMsgRecvd(InterfaceName, Node));

                    if (outerInstance.mListener != null)
                    {
                        outerInstance.mListener.lossCalculated(InterfaceName, Node, totalTime, loss);
                        outerInstance.mListener.updateGrid(InterfaceName, Node, msg_count + 1);
                    }

                    outerInstance.StopTimer(InterfaceName, Node);
                    outerInstance.setMessageCount(InterfaceName, Node);
                }
                else
                {
                    if (outerInstance.mListener != null)
                    {
                        outerInstance.mListener.restart_timer(InterfaceName, Node, msg_count);
                    }
                }
            }