mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
more advanced time technique(s)
This commit is contained in:
parent
4959da3ce6
commit
294119d2ec
5 changed files with 28 additions and 24 deletions
|
|
@ -1276,12 +1276,17 @@ def readXmlFile(xmlFile):
|
|||
xfile.close()
|
||||
return retVal
|
||||
|
||||
def calculateDeltaSeconds(start, epsilon=0.1):
|
||||
def average(values):
|
||||
"""
|
||||
Returns elapsed time from start till now (including expected
|
||||
error set by epsilon parameter)
|
||||
Computes the arithmetic mean of a list of numbers.
|
||||
"""
|
||||
return time.time() - start - kb.responseTime + epsilon
|
||||
return sum(values, 0.0) / len(values)
|
||||
|
||||
def calculateDeltaSeconds(start):
|
||||
"""
|
||||
Returns elapsed time from start till now
|
||||
"""
|
||||
return time.time() - start
|
||||
|
||||
def initCommonOutputs():
|
||||
kb.commonOutputs = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue