'This method calculates the AVG time.
:param uri: This is the url to register.
:param method: GET/POST
:param dc: This is the data container that ExtendedUrllib is going to send.
:return: No value is returned.'

def _calculateAvg(self, uri, method, dc):

    if ((uri, method, str(dc)) not in self._outgoingRequests.keys()):
        self._registerRequest(uri, method, dc)
    elif ((uri, method, str(dc)) not in self._incomingResponses.keys()):
        self._numberOfRequests += 1
        self._registerResponse(uri, method, dc)
    else:
        om.out.error('time_analysis    plugin    detected    an    internal    error.')
    if (self._numberOfRequests == AVERAGE_CALCULATION):
        reqTime = 0
        resTime = 0
        for req in self._outgoingRequests.keys():
            reqTime += self._outgoingRequests[req]
            del self._outgoingRequests[req]
        for res in self._incomingResponses.keys():
            resTime += self._incomingResponses[res]
            del self._incomingResponses[res]
        self._average = ((resTime - reqTime) / AVERAGE_CALCULATION)
