I am trying to create a Tkinter GUI that records the time-pressed between buttons and then appends the tuple output to a list however it is recording the time difference as 1625044470.590308
. I have no idea what this number means so if anybody understands this weird bug help would be appreciated.
My Code:
import time
from tkinter import *
initial = 0
top = Tk()
command_time_list = []
master_list = []
print(command_time_list)
#start forward
def start_time_forward():
global initial
print("Timer Start")
initial = time.time()
return initial
def stop_time_forward():
final = time.time()
time_elapsed = final - initial
command_time_list.append('a')
command_time_list.append(time_elapsed)
command_time_tuple = tuple(command_time_list)
return command_time_tuple
command_time_tuple = stop_time_forward()
def append():
master_list.append(command_time_tuple)
print(master_list)
forward_start = Button(top, text ="Forward Time Start", command = start_time_forward)
forward_end = Button(top, text ="Forward Time Stop", command = stop_time_forward)
append = Button(top, text="append path pair", command=append)