/[eiffelstudio]/trunk/Delivery/newdocs/technologies/dotnet/samples/platform/timers.html
ViewVC logotype

Contents of /trunk/Delivery/newdocs/technologies/dotnet/samples/platform/timers.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 34197 - (show annotations)
Sat Aug 31 04:11:03 2002 UTC (17 years, 5 months ago) by manus
File MIME type: text/html
File size: 3032 byte(s)
Renamed `htm' into `html'.

1 <script src="../instal.js"></script>
2
3 <html>
4
5 <head>
6 <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
7 <meta name="ProgId" content="FrontPage.Editor.Document">
8 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
9 <title>Timers</title>
10 <LINK REL=StyleSheet HREF="../../../../default.css">
11 <style>
12 <!--
13 .FixedText{MARGIN-LEFT: 3ex;FONT-FAMILY: Lucida Console;FONT-SIZE: x-small;FONT-WEIGHT: Bold}
14 -->
15 </style>
16 </head>
17
18 <body>
19
20 <h1>
21 Timers example</h1>
22
23 <p>This sample consist in a command line demonstrating the use of the <span class="eClass">TIMER</span>
24 (Timer) class to generate a periodic callback to a method. The sample creates a
25 <span class="eClass">TIMER</span> object and passes to it a delegate object. When the <span class="eClass">TIMER</span> fires, the
26 delegate is invoked, and a static method is called asynchronously by a worker
27 thread in the thread pool.</p>
28
29 <p>&nbsp;</p>
30
31 <H2>Compiling</H2>
32 <script language="JavaScript">
33 <!--
34 var path_to_ace_file = Eiffel_version + "\\examples\\dotnet\\winforms\\menu\\";
35 var ace_file_name = "Ace";
36 var path_eifp_file = "..\\..\\examples\\threading\\timers\\"
37 var eifp_name = "Eiffel project.eifp";
38
39 if (eiffel_studio) {
40 write_eiffel_studio_compiling_instruction (path_to_ace_file, ace_file_name)
41 }
42 else {
43 write_envision_compiling_instruction (path_eifp_file, eifp_name)
44 }
45 -->
46 </script>
47 <noscript>
48 <p>To see compiling instructions, you have to enable javascript.</p></noscript>
49
50 <h2>Running</h2>
51 <P>
52 After you launch the sample, the following output appears:
53 </P>
54 <pre>Checking for status updates every two seconds
55 &lt;Hit Enter to terminate the sample&gt;
56 Checking Status.
57 Checking Status.
58 Checking Status.
59 Checking Status.
60 Checking Status.
61 ...</PRE>
62 <P>
63 When the display is finished, the application wait for you to
64 pressed the return key to finished the application.</P>
65 <P>
66 &nbsp;</P>
67 <h2>Under the Hood</h2>
68 <p>This application shows how to use the thread
69 <a href="mk:/libraries/vision2/reference/interface/kernel/ev_accelerator_chart.html">
70 TIMER</a>. The timer is launched (<span class="eKeyword">create</span> <span class="eLocal">my_timer</span>.<span class="eFeature">make_with_callback</span> (<span class="eKeyword">create</span> {<span class="eClass">TIMER_CALLBACK</span>}.<span class="eFeature">make</span>
71 (Current, $<span class="eFeature">check_status</span>), Void, 0, 2000)) and call the feature <span class="eFeature">check_status</span> that
72 displays the message <span class="eString">&quot;Checking Status.&quot;</span> every two seconds.</p>
73 <p>This sample contains the following class: </p>
74 <ul>
75 <li>
76 <span class="eClass">
77 TIMER</span></li>
78 <li>
79 <span class="eClass">
80 TIMER_CALLBACK</span></li>
81 </ul>
82
83 <p>&nbsp;</p>
84
85 <h2>Notes</h2></a>
86 <p class="Text">This sample is translated from the example located in the
87 Samples\Technologies\Threading\Timers subdirectory of the .NET Framework SDK
88 samples directory of Microsoft Visual Studio .NET.</p>
89
90 </body>
91
92 </html>

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23