Skip to main content
ConnectionProfile.GetConnectivityIntervalsAsync | getConnectivityIntervalsAsync method

Applies to Windows and Windows Phone

Gets a list of ConnectivityInterval objects, which indicate the timestamp for when the network connection began, and a time-span for the duration of that connection.

Syntax


connectionProfile.getConnectivityIntervalsAsync(startTime, endTime, states).done( /* Your success and error handlers */ );

public IAsyncOperation<IReadOnlyList> GetConnectivityIntervalsAsync(
  DateTimeOffset startTime, 
  DateTimeOffset endTime, 
  NetworkUsageStates states
)

Public Function GetConnectivityIntervalsAsync(
  startTime As DateTimeOffset,  
  endTime As DateTimeOffset,  
  states As NetworkUsageStates 
) As IAsyncOperation(Of IReadOnlyList)

public:
IAsyncOperation<IVectorView>^ GetConnectivityIntervalsAsync(
  DateTime startTime, 
  DateTime endTime, 
  NetworkUsageStates states
)

Parameters

startTime

Type: Date [JavaScript] | System.DateTimeOffset [.NET] | Windows::Foundation::DateTime [C++]

The start time over which to retrieve data. Can be no more than 60 days prior to the current time.

endTime

Type: Date [JavaScript] | System.DateTimeOffset [.NET] | Windows::Foundation::DateTime [C++]

The end time over which to retrieve data.

states

Type: NetworkUsageStates

The state of the connection profile for which usage data should be returned.

Return value

Type: IAsyncOperation<IVectorView>

When the method completes, it returns a list of ConnectivityInterval objects, which indicate the start time and duration for the current or prior connections.

Remarks

For an example of how these methods are used, see How to retrieve connection usage data for a specific period of time

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Networking.Connectivity
Windows::Networking::Connectivity [C++]

Metadata

Windows.winmd

See also

ConnectionProfile