Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 72cb976

Browse files
committedAug 10, 2020
remove memory leak
1 parent 8748a32 commit 72cb976

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed
 

‎Time Percentage.pyw

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
from tkinter import *
2-
from threading import Timer
32
from datetime import datetime, timezone
43
from ctypes import windll
54

65
# This is a new time standard, meant to be universal for everyone. It does not have time zones.
76
# It uses percentage so that everyone can understand it, and it's reference is UTC 24 hour time.
87

9-
# To-Do: multi-device, memory leak?
8+
# To-Do: multi-device
109

1110

1211
ALWAYS_ON_TOP = True
@@ -83,10 +82,8 @@ def update():
8382
if ALWAYS_ON_TOP:
8483
root.lift()
8584

86-
t = Timer(0.5, update)
87-
t.setDaemon(True)
88-
t.start()
85+
root.after(500, update)
8986

9087

91-
update()
88+
root.after(0, update)
9289
root.mainloop()

0 commit comments

Comments
 (0)
Please sign in to comment.