summaryrefslogtreecommitdiffstats
path: root/linhes
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2022-11-22 21:23:26 (GMT)
committerBritney Fransen <brfransen@gmail.com>2022-11-22 21:23:26 (GMT)
commita84b80d7b021899ac74d828d45234cc2982e8f70 (patch)
treec1efc99de9836fa1c522fc0c2d559c8881cdf393 /linhes
parent003fe951e1d811a01d17fcbfff8d4491503833b3 (diff)
downloadlinhes_pkgbuild-a84b80d7b021899ac74d828d45234cc2982e8f70.zip
linhes_pkgbuild-a84b80d7b021899ac74d828d45234cc2982e8f70.tar.gz
linhes_pkgbuild-a84b80d7b021899ac74d828d45234cc2982e8f70.tar.bz2
linhes-dev: mp.py: add build time
Diffstat (limited to 'linhes')
-rw-r--r--linhes/linhes-dev/PKGBUILD4
-rwxr-xr-xlinhes/linhes-dev/mp.py53
2 files changed, 49 insertions, 8 deletions
diff --git a/linhes/linhes-dev/PKGBUILD b/linhes/linhes-dev/PKGBUILD
index 55d1b46..ceca506 100644
--- a/linhes/linhes-dev/PKGBUILD
+++ b/linhes/linhes-dev/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=linhes-dev
pkgver=9.0.0
-pkgrel=4
+pkgrel=5
pkgdesc="Scripts to develop LinHES"
arch=('x86_64')
license=('GPL2')
@@ -14,6 +14,6 @@ package() {
install -D -m755 * ${pkgdir}/usr/bin/
}
sha256sums=('3a64b4125b56c6f95cc9dc85ce58ebd1c0612b22fb27c3e76d4d9a5570f2d61e'
- 'a633271346d0fc455a45a8bcc374f2e950472039f1410a62aeef69687700f286'
+ 'd7afe023b5ba5ebb5e1a12d954651e435584034e5b00c37d9a70d0d6fe20643f'
'b5d12503757471be72fa20fb86a0b1563916b4db85048dcd78b49eaade3db989'
'86c9ebe77228f7e3cc07cb05f480e5584e0e3cad1b889b63a50821f7323bf449')
diff --git a/linhes/linhes-dev/mp.py b/linhes/linhes-dev/mp.py
index 33832d0..b1bdfa7 100755
--- a/linhes/linhes-dev/mp.py
+++ b/linhes/linhes-dev/mp.py
@@ -519,7 +519,44 @@ class Packagefile(object):
filename = "%s/__changelog" %pkgdir
return os.path.exists(filename)
-
+def formatTD(time):
+ # convert seconds to day, hour, minutes and seconds
+ days = time // (24 * 3600)
+ time = time % (24 * 3600)
+ hours = time // 3600
+ time %= 3600
+ minutes = time // 60
+ time %= 60
+ seconds = int(time)
+
+ if days == 0:
+ day_string = ""
+ elif days > 1:
+ day_string = "%s days, " %days
+ else:
+ day_string = "%s day, " %days
+
+ if hours == 0:
+ hour_string = ""
+ elif hours > 1:
+ hour_string = "%s hours, " %hours
+ else:
+ hour_string = "%s hour, " %hours
+
+ if minutes == 0:
+ minute_string = ""
+ elif minutes > 1:
+ minute_string = "%s minutes, " %minutes
+ else:
+ minute_string = "%s minute, " %minutes
+
+ if seconds > 1:
+ second_string = "%s seconds" %seconds
+ else:
+ second_string = "%s second" %seconds
+
+ return_string = '%s%s%s%s' % (day_string, hour_string, minute_string, second_string)
+ return return_string
def main():
pkg_not_found=[]
@@ -572,19 +609,23 @@ def main():
print("\n")
print("Couldn't find these packages:")
- print("----------------------------")
+ print("---------------------------------")
print(pkg_not_found)
print("\n")
print("Failed to compile these packages:")
- print("----------------------------")
- print( failed_compile)
+ print("---------------------------------")
+ print(failed_compile)
print("\n")
print("Successful compiled :")
- print("---------------------------")
+ print("---------------------------------")
print(success_pkg)
+ print("\n")
if __name__ == "__main__":
+ start = time.time()
main()
- print("--------------------------")
+ end = time.time()
+ print("Build Time:",formatTD(end - start))
+ print("#######################################################")