May be you are looking for getiftable() function of windows. It is a winapi function that provides all the information related to a particular network interface
Here is a good example of it
Here is the explanation of the entire structure
According to msdn
dwLastChange
Type: DWORD
The length of time, in hundredths of seconds (10^-2 sec), starting from the last computer restart, when the interface entered its current operational state.
When connected, it will give you the time since it is so - i.e. in connected state.
Here is the declaration of this function in c#
public static extern uint GetIfTable(IntPtr pIfTable, ref uint pdwSize, bool bOrder);
Declare Function GetIfTable Lib "iphlpapi.dll" (TODO) As TODO
IPHelperTraslation.GetIfTable(IntPtr.Zero, ref size, false);
IPHelperTraslation.GetIfTable(buf, ref size, false);
You can use pinvoke.net for further help on declaration.
It seems like there is an easy way in .Net framework but not as expected
http://msdn.microsoft.com/en-us/library/system.net.networkinformation.operationalstatus.aspx
Check out the way they have implemented network status detection.
My assumption is, you will have to record the time in your application since the status last changed.
I also practically tested the getifrow function and to my disappointment, it always returns zero on Win7, don't know about other platforms.