0

I am trying to make a program to an accelerator. I'm have to find a way to know how many seconds the application is running.

My code:

#t = time application is running 
while True:
    qf = 17
    qi = 0
    tf = 15 * (qf - qi) / 8 * 100
    if tf < t:
        a3 = 16 * 100 / 3 * tf ** 2
        a4 = -8 * 100 / tf ** 3
        a5 = 16 * 100 / 5 * tf ** 4
        qt = 3 * a3 * t ** 2 + 4 * a4 * t ** 3 + 5 * a5 * t ** 4
    else:
        sys.exit()

I have tried to use "time.time()" and also "time.sleep()", but didn't get any good result.

Arthur
  • 1
  • 1
  • check this link out. https://stackoverflow.com/questions/12444004/how-long-does-my-python-application-take-to-run – Sashaank Jun 10 '20 at 15:17
  • @Sashaank For some reason, when I print the value using this method it starts in 6 seconds. That's why I asked. – Arthur Jun 10 '20 at 15:24

0 Answers0