aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-12 18:46:16 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-12 18:46:16 -0400
commit2038f3095041aee4a093dea735fb0f10c30d1900 (patch)
treef9aed05b90bd962d5b52b6bb62631fcf6e6e8bed
parent6bb904e94369a14239b9ce51516497065272e12a (diff)
downloadqolab-2038f3095041aee4a093dea735fb0f10c30d1900.tar.gz
qolab-2038f3095041aee4a093dea735fb0f10c30d1900.zip
generalize after method
-rw-r--r--funcGenerator.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/funcGenerator.py b/funcGenerator.py
index b34dcce..4cbef0c 100644
--- a/funcGenerator.py
+++ b/funcGenerator.py
@@ -117,7 +117,13 @@ class Sweeper:
idleTime_mS = round((deadline-stop).seconds * 1000 + (deadline-stop).microseconds/1000)
# print("Will idle for %s" % (idleTime_mS) )
- self.widget.after(idleTime_mS, self.onTic)
+ self.after(idleTime_mS, self.onTic)
+
+ def after(self, idleTime_mS, cmnd):
+ # this function modelled after Tk.after
+ # it is execute 'cmnd' after idle time given in mS
+ # idleTime_mS = 0 means execute immediately
+ self.widget.after(idleTime_mS, cmnd)
def cmdRestart(self):