initial
This commit is contained in:
parent
7918ee8d8e
commit
2fe8bad74c
2 changed files with 16 additions and 1 deletions
|
|
@ -103,6 +103,7 @@ duration = end - start
|
||||||
|
|
||||||
os.remove(logfilepath)
|
os.remove(logfilepath)
|
||||||
|
|
||||||
|
if duration.total_seconds() >6:
|
||||||
notify_telegram(("<b>Backup Statistics:</b>\n\n%s\n\n<i>Start Time</i>: %s\n<i>End Time</i>: %s\n<i>Duration</i>: %s minutes" %
|
notify_telegram(("<b>Backup Statistics:</b>\n\n%s\n\n<i>Start Time</i>: %s\n<i>End Time</i>: %s\n<i>Duration</i>: %s minutes" %
|
||||||
("\n\n".join(result_msg), start.strftime("%Y-%m-%d %H:%M:%S"), end.strftime("%Y-%m-%d %H:%M:%S"),
|
("\n\n".join(result_msg), start.strftime("%Y-%m-%d %H:%M:%S"), end.strftime("%Y-%m-%d %H:%M:%S"),
|
||||||
divmod(duration.total_seconds(), 60)[0])))
|
divmod(duration.total_seconds(), 60)[0])))
|
||||||
|
|
|
||||||
14
test.py
Normal file
14
test.py
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
import datetime
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
|
start = datetime.datetime.now()
|
||||||
|
#sleep(5)
|
||||||
|
end = datetime.datetime.now()
|
||||||
|
duration = end - start
|
||||||
|
|
||||||
|
if duration.total_seconds() >6:
|
||||||
|
print('Ein Ereigniss')
|
||||||
|
else:
|
||||||
|
print('kein Ereigniss')
|
||||||
|
print(duration.total_seconds())
|
||||||
|
print(divmod(65, 60)[0], divmod(65, 60)[1])
|
||||||
Loading…
Add table
Add a link
Reference in a new issue