Added finished time

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2024-09-26 23:54:11 +03:00
parent 6f8d8ab04d
commit e39ea72600
3 changed files with 7 additions and 2 deletions

View file

@ -1,6 +1,6 @@
## slpkg - ChangeLog ## slpkg - ChangeLog
### 5.1.3 - 19/09/2024 ### 5.1.3 - 26/09/2024
- Fixed: - Fixed:
* Fixed ascii characters done and failed * Fixed ascii characters done and failed
@ -10,6 +10,7 @@
- Added: - Added:
* Added to support git repositories * Added to support git repositories
* Added finished time for update
### 5.1.2 - 22/08/2024 ### 5.1.2 - 22/08/2024

View file

@ -4,6 +4,7 @@
import os import os
import sys import sys
import time
import logging import logging
from pathlib import Path from pathlib import Path
from signal import signal, SIGPIPE, SIG_DFL from signal import signal, SIGPIPE, SIG_DFL
@ -437,8 +438,11 @@ class Menu(Configs): # pylint: disable=[R0902]
check = CheckUpdates(self.flags, self.repository) check = CheckUpdates(self.flags, self.repository)
check.updates() check.updates()
else: else:
start: float = time.time()
update = UpdateRepositories(self.flags, self.repository) update = UpdateRepositories(self.flags, self.repository)
update.repositories() update.repositories()
elapsed_time: float = time.time() - start
self.utils.finished_time(elapsed_time)
raise SystemExit(0) raise SystemExit(0)
self.usage.help_short(1) self.usage.help_short(1)

View file

@ -129,7 +129,7 @@ class Utilities(Configs):
Args: Args:
elapsed_time (float): Unformatted time. elapsed_time (float): Unformatted time.
""" """
print('\nFinished:', time.strftime('%H:%M:%S', time.gmtime(elapsed_time))) print('Finished:', time.strftime('%H:%M:%S', time.gmtime(elapsed_time)))
@staticmethod @staticmethod
def is_option(options: tuple, flags: list) -> bool: def is_option(options: tuple, flags: list) -> bool: