I have been trying out a timer and it keeps printing 0 and i don't know exactly how to fix it
import time
x=time.time
y=time.time
z=0
b=2
while b<10000:
print b
b=b+10
z=x-y
print z
I think the reason why i keep getting 0 is because i'm doing x-y but if I just leave it and print x or y it comes up with the totally wrong thing. Can anyone tell me how to make this work, so at the end it prints how long the program has been running for, lets say the while loop takes 20 seconds it should print 20 seconds.