I am trying to do the following to measure how long a function takes over a loop
a = datetime.datetime.now()
while x<1:
   callFunction()
   b = datetime.datetime.now()
   c = b-a  
   print(str(c))
But I am getting this error
   c = b-a
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'float'
What am I doing wrong?
 
    