From 2b63b5f0a62f65d78229aa6347a7a59bdfc9927c Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Sat, 17 Aug 2019 23:28:37 -0400 Subject: [PATCH] added total time display --- bin/video2x_gui.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/video2x_gui.py b/bin/video2x_gui.py index b5d23ff..b8144dd 100644 --- a/bin/video2x_gui.py +++ b/bin/video2x_gui.py @@ -225,6 +225,9 @@ class Video2xGui(): def _upscale(self): + # start timer + begin_time = time.time() + # read configuration file config = read_config('video2x.json') config = absolutify_paths(config) @@ -320,12 +323,11 @@ class Video2xGui(): self.upscaler.cleanup_temp_directories() # show message when upscaling completes - messagebox.showinfo('Info', 'Upscaling Completed') + messagebox.showinfo('Info', f'Upscaling Completed\nTime Taken: {round((time.time() - begin_time), 5)} seconds') self.progress_bar['value'] = 100 self.running = False self.start_button_text.set('Start') - def _progress_bar(self): """ This method prints a progress bar