Product SiteDocumentation Site

9.2. Timer Handling

The Python libvirt module supplies a framework for timer handling. Creating a timer requires that an event loop has previously been registered with virEventRegisterImpl or virEventRegisterDefaultImpl.
Timer handling is done through the functions virEventAddTimeout, virEventUdateTimeout, and virEventRemoveTimeout. The implementation will support many timers.
To create a new timer call the VirEventAddTimout after the virEventRegisterImpl or the virEventRegisterDefaultImpl function has been invoked.
The timer can be removed using the VirEventRemoveTimout or updated with the virEventUpdateTimeout function after it has been added.