So i want to create a simple download eta calculator, and here is my code for it
import PySimpleGUI as sg
layout = [[sg.Text('What is your download speed in MB/s?')],
[sg.InputText()],
[sg.Text('What is the size of the file in GB?')],
[sg.InputText()],
[sg.Submit(), sg.Cancel()]]
window = sg.Window('Window Title', layout)
event, values = window.read()
window.close()
download_speed = float(values[0])
file_size = float(values[1]) * 1024
file_size_divided = file_size/download_speed
eta_in_minutes = file_size_divided/60
eta_in_hours = eta_in_minutes/60
eta_in_hours_formatted = eta_in_hours
sg.popup('ETA in minutes', round(eta_in_minutes, 2), 'ETA in hours', round(eta_in_hours, 2))
but I want the eta in hours to be displayed in a way where it says Hours and minutes, right now if you use for example 2.2 mb/s and 46 gb, it will give the answer 2.2 hours, I want that to say 2 hours and 12 minutes.