IcmpV4Statistics.TimestampRequestsReceived 属性

定义

获取接收到的 Internet 控制消息协议版本 4 (ICMPv4)“时间戳请求”消息的数目。

public:
 abstract property long TimestampRequestsReceived { long get(); };
public abstract long TimestampRequestsReceived { get; }
member this.TimestampRequestsReceived : int64
Public MustOverride ReadOnly Property TimestampRequestsReceived As Long

属性值

一个 Int64 值,指定接收到的“时间戳请求”消息的总数。

示例

以下示例显示此属性的值。

void ShowTimestampData()
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   IcmpV4Statistics ^ statistics = properties->GetIcmpV4Statistics();
   Console::WriteLine( "  Timestamp Requests .................. Sent: {0,-10}   Received: {1,-10}", 
      statistics->TimestampRequestsSent, 
      statistics->TimestampRequestsReceived );
   Console::WriteLine( "  Timestamp Replies ................... Sent: {0,-10}   Received: {1,-10}", 
      statistics->TimestampRepliesSent, 
      statistics->TimestampRepliesReceived );
}
public static void ShowTimestampData()
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    IcmpV4Statistics statistics = properties.GetIcmpV4Statistics();
    Console.WriteLine("  Timestamp Requests .................. Sent: {0,-10}   Received: {1,-10}",
        statistics.TimestampRequestsSent, statistics.TimestampRequestsReceived);
    Console.WriteLine("  Timestamp Replies ................... Sent: {0,-10}   Received: {1,-10}",
        statistics.TimestampRepliesSent, statistics.TimestampRepliesReceived);
}
Public Shared Sub ShowTimestampData() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim statistics As IcmpV4Statistics = properties.GetIcmpV4Statistics()
    Console.WriteLine("  Timestamp Requests .................. Sent: {0,-10}   Received: {1,-10}", statistics.TimestampRequestsSent, statistics.TimestampRequestsReceived)
    Console.WriteLine("  Timestamp Replies ................... Sent: {0,-10}   Received: {1,-10}", statistics.TimestampRepliesSent, statistics.TimestampRepliesReceived)

End Sub

注解

时间戳请求消息导致接收计算机将时间戳回复发送回原始计算机。 这些消息用于测量网络上的传输速度。

适用于