| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 |
<html> |
| 3 |
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ --> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 6 |
<title>after (GCL TK Manual)</title> |
| 7 |
|
| 8 |
<meta name="description" content="after (GCL TK Manual)"> |
| 9 |
<meta name="keywords" content="after (GCL TK Manual)"> |
| 10 |
<meta name="resource-type" content="document"> |
| 11 |
<meta name="distribution" content="global"> |
| 12 |
<meta name="Generator" content="makeinfo"> |
| 13 |
<link href="index.html" rel="start" title="Top"> |
| 14 |
<link href="wm.html#SEC_Contents" rel="contents" title="Table of Contents"> |
| 15 |
<link href="Control.html" rel="up" title="Control"> |
| 16 |
<link href="bind.html" rel="next" title="bind"> |
| 17 |
<link href="Control.html" rel="prev" title="Control"> |
| 18 |
<style type="text/css"> |
| 19 |
<!-- |
| 20 |
a.summary-letter {text-decoration: none} |
| 21 |
blockquote.indentedblock {margin-right: 0em} |
| 22 |
div.display {margin-left: 3.2em} |
| 23 |
div.example {margin-left: 3.2em} |
| 24 |
div.lisp {margin-left: 3.2em} |
| 25 |
kbd {font-style: oblique} |
| 26 |
pre.display {font-family: inherit} |
| 27 |
pre.format {font-family: inherit} |
| 28 |
pre.menu-comment {font-family: serif} |
| 29 |
pre.menu-preformatted {font-family: serif} |
| 30 |
span.nolinebreak {white-space: nowrap} |
| 31 |
span.roman {font-family: initial; font-weight: normal} |
| 32 |
span.sansserif {font-family: sans-serif; font-weight: normal} |
| 33 |
ul.no-bullet {list-style: none} |
| 34 |
--> |
| 35 |
</style> |
| 36 |
|
| 37 |
|
| 38 |
</head> |
| 39 |
|
| 40 |
<body lang="en"> |
| 41 |
<span id="after"></span><div class="header"> |
| 42 |
<p> |
| 43 |
Next: <a href="bind.html" accesskey="n" rel="next">bind</a>, Previous: <a href="Control.html" accesskey="p" rel="prev">Control</a>, Up: <a href="Control.html" accesskey="u" rel="up">Control</a> [<a href="wm.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> |
| 44 |
</div> |
| 45 |
<hr> |
| 46 |
<span id="after-1"></span><h3 class="section">3.1 after</h3> |
| 47 |
|
| 48 |
<p>after - Execute a command after a time delay |
| 49 |
</p><span id="Synopsis-15"></span><h4 class="unnumberedsubsec">Synopsis</h4> |
| 50 |
<p><b>after </b><i>ms </i><span class="roman">?</span><i>arg1 arg2 arg3 ...</i>? |
| 51 |
</p> |
| 52 |
<span id="Description-12"></span><h4 class="unnumberedsubsec">Description</h4> |
| 53 |
|
| 54 |
<p>This command is used to delay execution of the program or to execute |
| 55 |
a command in background after a delay. The <i>ms</i> argument gives |
| 56 |
a time in milliseconds. |
| 57 |
If <i>ms</i><span class="roman"> is the only argument to </span><b>after</b> |
| 58 |
then the command sleeps for <i>ms</i> milliseconds and returns. |
| 59 |
While the command is sleeping the application does not respond to |
| 60 |
X events and other events. |
| 61 |
</p> |
| 62 |
<p>If additional arguments are |
| 63 |
present after <i>ms</i>, then a Tcl command is formed by concatenating |
| 64 |
all the additional arguments in the same fashion as the <b>concat</b> |
| 65 |
command. <b>After</b> returns immediately but arranges for the command |
| 66 |
to be executed <i>ms</i> milliseconds later in background. |
| 67 |
The command will be executed at global level (outside the context |
| 68 |
of any Tcl procedure). |
| 69 |
If an error occurs while executing the delayed command then the |
| 70 |
<b>tkerror</b> mechanism is used to report the error. |
| 71 |
</p> |
| 72 |
<p>The <b>after</b> command always returns an empty string. |
| 73 |
</p> |
| 74 |
<p>See <a href="tkerror.html">tkerror</a>. |
| 75 |
</p> |
| 76 |
<span id="Keywords-15"></span><h4 class="unnumberedsubsec">Keywords</h4> |
| 77 |
<p>delay, sleep, time |
| 78 |
</p> |
| 79 |
|
| 80 |
|
| 81 |
</body> |
| 82 |
</html> |