diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-12 18:46:16 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-12 18:46:16 -0400 |
commit | 2038f3095041aee4a093dea735fb0f10c30d1900 (patch) | |
tree | f9aed05b90bd962d5b52b6bb62631fcf6e6e8bed /funcGenerator.py | |
parent | 6bb904e94369a14239b9ce51516497065272e12a (diff) | |
download | pyExpControl-2038f3095041aee4a093dea735fb0f10c30d1900.tar.gz pyExpControl-2038f3095041aee4a093dea735fb0f10c30d1900.zip |
generalize after method
Diffstat (limited to 'funcGenerator.py')
-rw-r--r-- | funcGenerator.py | 8 |
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): |