commit 3d71540afe723d10158782f72e041298cb59324b
Author: W. David Ashley <w.david.ashley(a)gmail.com>
Date: Fri Aug 14 14:06:34 2015 -0500
Events chapter
- added the timer section
en-US/Event_Handling.xml | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/en-US/Event_Handling.xml b/en-US/Event_Handling.xml
index 103af24..82a20ef 100644
--- a/en-US/Event_Handling.xml
+++ b/en-US/Event_Handling.xml
@@ -32,4 +32,26 @@
<programlisting language="Python"><xi:include
href="extras/Events-Example-1.py" parse="text"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
</example>
</section>
+ <section
id="libvirt_application_development_guide_using_python-Timer_Handling">
+ <title>Timer Handling</title>
+ <para>
+ The Python libvirt module supplies a framework for timer handling. Creating a
timer requires
+ that an event loop has previously been registered with
<literal>virEventRegisterImpl</literal>
+ or <literal>virEventRegisterDefaultImpl</literal>.
+ </para>
+ <para>
+ Timer handling is done through the functions
<literal>virEventAddTimeout</literal>,
+ <literal>virEventUdateTimeout</literal>, and
<literal>virEventRemoveTimeout</literal>. The
+ implementation will support many timers.
+ </para>
+ <para>
+ To create a new timer call the
<literal>VirEventAddTimout</literal> after the
+ <literal>virEventRegisterImpl</literal> or the
<literal>virEventRegisterDefaultImpl</literal>
+ function has been invoked.
+ </para>
+ <para>
+ The timer can be removed using the
<literal>VirEventRemoveTimout</literal> or updated with the
+ <literal>virEventUpdateTimeout</literal> function after it has
been added.
+ </para>
+ </section>
</chapter>