summaryrefslogtreecommitdiffstats
path: root/doc/after.n
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2004-10-27 14:24:37 (GMT)
committerdkf <dkf@noemail.net>2004-10-27 14:24:37 (GMT)
commit607effd0dd6e52b3730f13b0c882db8dbfcb7e97 (patch)
treec19b22fbb2165682630fecbf3779e53b26c9002f /doc/after.n
parenta883a89018ec8df173b7e0d33e814488e407d8a5 (diff)
downloadtcl-607effd0dd6e52b3730f13b0c882db8dbfcb7e97.zip
tcl-607effd0dd6e52b3730f13b0c882db8dbfcb7e97.tar.gz
tcl-607effd0dd6e52b3730f13b0c882db8dbfcb7e97.tar.bz2
More minor doc fixes
FossilOrigin-Name: 83ab8061842a2bb28ef192d378c328fd7a7984e6
Diffstat (limited to 'doc/after.n')
-rw-r--r--doc/after.n18
1 files changed, 7 insertions, 11 deletions
diff --git a/doc/after.n b/doc/after.n
index 6e6ab1a..5cabb98 100644
--- a/doc/after.n
+++ b/doc/after.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: after.n,v 1.5 2004/10/27 09:36:58 dkf Exp $
+'\" RCS: @(#) $Id: after.n,v 1.6 2004/10/27 14:24:37 dkf Exp $
'\"
.so man.macros
.TH after n 7.5 Tcl "Tcl Built-In Commands"
@@ -101,24 +101,21 @@ will not be executed unless the application enters the event loop.
In applications that are not normally event-driven, such as
\fBtclsh\fR, the event loop can be entered with the \fBvwait\fR
and \fBupdate\fR commands.
-
.SH "EXAMPLES"
This defines a command to make Tcl do nothing at all for \fIN\fR
seconds:
-
.CS
proc sleep {N} {
- \fBafter\fR [expr {int($N * 1000)}]
+ \fBafter\fR [expr {int($N * 1000)}]
}
.CE
-
+.PP
This arranges for the command \fIwake_up\fR to be run in eight hours
(providing the event loop is active at that time):
-
.CS
\fBafter\fR [expr {1000 * 60 * 60 * 8}] wake_up
.CE
-
+.PP
The following command can be used to do long-running calculations (as
represented here by \fI::my_calc::one_step\fR, which is assumed to
return a boolean indicating whether another step should be performed)
@@ -129,12 +126,11 @@ processing steps (arranging for the next step to be done using an
already-triggered timer event only when the event queue has been
drained) and is useful when you want to ensure that a Tk GUI remains
responsive during a slow task.
-
.CS
proc doOneStep {} {
- if {[::my_calc::one_step]} {
- \fBafter\fR idle [list \fBafter\fR 0 doOneStep]
- }
+ if {[::my_calc::one_step]} {
+ \fBafter idle\fR [list \fBafter\fR 0 doOneStep]
+ }
}
doOneStep
.CE