I have a client application that calls a web service hosted in iis on another server
var start = DateTime.Now.TimeOfDay;
var result = serviceClient.PerformOperation();
var timeConsumed = DateTime.Now.TimeOfDay - start;
The PerformOperation()
method takes about 0.6s in the server monitor application (0.6s is the actual time consumed to perform the operation) but the value of timeConsumed
is about 1.3 ~ 1.6s.
So the communication between server and client takes about 0.7s.
How to calculate this time consumed by the network communication in c#?