You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

289 lines
19 KiB

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>TermTk.TTkCore.timer_unix &mdash; pyTermTk 0.36.0-a
documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/theme_overrides.css" type="text/css" />
<link rel="stylesheet" href="../_static/ttk.css" type="text/css" />
<link rel="shortcut icon" href="https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/www/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="TermTk.TTkCore.ttk" href="TermTk.TTkCore.ttk.html" />
<link rel="prev" title="TermTk.TTkCore.timer_pyodide" href="TermTk.TTkCore.timer_pyodide.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyTermTk
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Tutorials</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/000-examples.html">pyTermTk - &lt; <strong>the Examples</strong> &gt;</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/001-helloworld.html">pyTermTk - Hello World</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/002-layout.html">pyTermTk - Layouts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/003-signalslots.html">pyTermTk - Signal &amp; Slots</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/004-logging.html">pyTermTk - Logging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/005-calculator.html">pyTermTk - Your first Calculator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/ttkDesigner/textEdit/README.html">ttkDesigner - Your first TextEditor</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Features</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../info/features/index.html">Features</a></li>
<li class="toctree-l1"><a class="reference internal" href="../info/features/crosscompatible.html">Cross Compatibility</a></li>
<li class="toctree-l1"><a class="reference internal" href="../info/features/widgets.html">Widgets</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Dev</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../info/installing.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../info/installing.html#quickstart">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../info/debug.html">Debug</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkAbstract.html">TermTk.TTkAbstract</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="TermTk.TTkCore.html">TermTk.TTkCore</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.TTkTerm.html">TermTk.TTkCore.TTkTerm</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.canvas.html">TermTk.TTkCore.canvas</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.cfg.html">TermTk.TTkCore.cfg</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.color.html">TermTk.TTkCore.color</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.constant.html">TermTk.TTkCore.constant</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.drivers.html">TermTk.TTkCore.drivers</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.filebuffer.html">TermTk.TTkCore.filebuffer</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.helper.html">TermTk.TTkCore.helper</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.log.html">TermTk.TTkCore.log</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.propertyanimation.html">TermTk.TTkCore.propertyanimation</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.signal.html">TermTk.TTkCore.signal</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.string.html">TermTk.TTkCore.string</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.timer.html">TermTk.TTkCore.timer</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.timer_pyodide.html">TermTk.TTkCore.timer_pyodide</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">TermTk.TTkCore.timer_unix</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#ttktimer">TTkTimer</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.ttk.html">TermTk.TTkCore.ttk</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkCore.util.html">TermTk.TTkCore.util</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkCore.TTkTerm.html">TermTk.TTkCore.TTkTerm</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkGui.html">TermTk.TTkGui</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkLayouts.html">TermTk.TTkLayouts</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkTemplates.html">TermTk.TTkTemplates</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkTestWidgets.html">TermTk.TTkTestWidgets</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkTheme.html">TermTk.TTkTheme</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkTypes.html">TermTk.TTkTypes</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkUiTools.html">TermTk.TTkUiTools</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkWidgets.html">TermTk.TTkWidgets</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkWidgets.TTkModelView.html">TermTk.TTkWidgets.TTkModelView</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkWidgets.TTkPickers.html">TermTk.TTkWidgets.TTkPickers</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkWidgets.TTkTerminal.html">TermTk.TTkWidgets.TTkTerminal</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyTermTk</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="TermTk.TTkCore.html">TermTk.TTkCore</a> &raquo;</li>
<li>TermTk.TTkCore.timer_unix</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/autogen.TermTk/TermTk.TTkCore.timer_unix.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="module-TermTk.TTkCore.timer_unix">
<span id="termtk-ttkcore-timer-unix"></span><h1>TermTk.TTkCore.timer_unix<a class="headerlink" href="#module-TermTk.TTkCore.timer_unix" title="Permalink to this heading"></a></h1>
<section id="ttktimer">
<h2>TTkTimer<a class="headerlink" href="#ttktimer" title="Permalink to this heading"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TTkTimer</span></span><a class="reference internal" href="../_modules/TermTk/TTkCore/timer_unix.html#TTkTimer"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer" title="Permalink to this definition"></a></dt>
<dd><dl class="py property">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.daemon">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">daemon</span></span><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.daemon" title="Permalink to this definition"></a></dt>
<dd><p>A boolean value indicating whether this thread is a daemon thread.</p>
<p>This must be set before start() is called, otherwise RuntimeError is
raised. Its initial value is inherited from the creating thread; the
main thread is not a daemon thread and therefore all threads created in
the main thread default to daemon = False.</p>
<p>The entire Python program exits when only daemon threads are left.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.getName">
<span class="sig-name descname"><span class="pre">getName</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.getName" title="Permalink to this definition"></a></dt>
<dd><p>Return a string used for identification purposes only.</p>
<p>This method is deprecated, use the name attribute instead.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.ident">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ident</span></span><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.ident" title="Permalink to this definition"></a></dt>
<dd><p>Thread identifier of this thread or None if it has not been started.</p>
<p>This is a nonzero integer. See the get_ident() function. Thread
identifiers may be recycled when a thread exits and another thread is
created. The identifier is available even after the thread has exited.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.isDaemon">
<span class="sig-name descname"><span class="pre">isDaemon</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.isDaemon" title="Permalink to this definition"></a></dt>
<dd><p>Return whether this thread is a daemon.</p>
<p>This method is deprecated, use the daemon attribute instead.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.is_alive">
<span class="sig-name descname"><span class="pre">is_alive</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.is_alive" title="Permalink to this definition"></a></dt>
<dd><p>Return whether the thread is alive.</p>
<p>This method returns True just before the run() method starts until just
after the run() method terminates. See also the module function
enumerate().</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.join">
<span class="sig-name descname"><span class="pre">join</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.join" title="Permalink to this definition"></a></dt>
<dd><p>Wait until the thread terminates.</p>
<p>This blocks the calling thread until the thread whose join() method is
called terminates – either normally or through an unhandled exception
or until the optional timeout occurs.</p>
<p>When the timeout argument is present and not None, it should be a
floating point number specifying a timeout for the operation in seconds
(or fractions thereof). As join() always returns None, you must call
is_alive() after join() to decide whether a timeout happened – if the
thread is still alive, the join() call timed out.</p>
<p>When the timeout argument is not present or None, the operation will
block until the thread terminates.</p>
<p>A thread can be join()ed many times.</p>
<p>join() raises a RuntimeError if an attempt is made to join the current
thread as that would cause a deadlock. It is also an error to join() a
thread before it has been started and attempts to do so raises the same
exception.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.name">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">name</span></span><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.name" title="Permalink to this definition"></a></dt>
<dd><p>A string used for identification purposes only.</p>
<p>It has no semantics. Multiple threads may be given the same name. The
initial name is set by the constructor.</p>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.native_id">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">native_id</span></span><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.native_id" title="Permalink to this definition"></a></dt>
<dd><p>Native integral thread ID of this thread, or None if it has not been started.</p>
<p>This is a non-negative integer. See the get_native_id() function.
This represents the Thread ID as reported by the kernel.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.run">
<span class="sig-name descname"><span class="pre">run</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/TermTk/TTkCore/timer_unix.html#TTkTimer.run"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.run" title="Permalink to this definition"></a></dt>
<dd><p>Method representing the thread’s activity.</p>
<p>You may override this method in a subclass. The standard run() method
invokes the callable object passed to the object’s constructor as the
target argument, if any, with sequential and keyword arguments taken
from the args and kwargs arguments, respectively.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.setDaemon">
<span class="sig-name descname"><span class="pre">setDaemon</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">daemonic</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.setDaemon" title="Permalink to this definition"></a></dt>
<dd><p>Set whether this thread is a daemon.</p>
<p>This method is deprecated, use the .daemon property instead.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.setName">
<span class="sig-name descname"><span class="pre">setName</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.setName" title="Permalink to this definition"></a></dt>
<dd><p>Set the name string for this thread.</p>
<p>This method is deprecated, use the name attribute instead.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="TermTk.TTkCore.timer_unix.TTkTimer.start">
<span class="sig-name descname"><span class="pre">start</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/TermTk/TTkCore/timer_unix.html#TTkTimer.start"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#TermTk.TTkCore.timer_unix.TTkTimer.start" title="Permalink to this definition"></a></dt>
<dd><p>Start the thread’s activity.</p>
<p>It must be called at most once per thread object. It arranges for the
object’s run() method to be invoked in a separate thread of control.</p>
<p>This method will raise a RuntimeError if called more than once on the
same thread object.</p>
</dd></dl>
</dd></dl>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="TermTk.TTkCore.timer_pyodide.html" class="btn btn-neutral float-left" title="TermTk.TTkCore.timer_pyodide" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="TermTk.TTkCore.ttk.html" class="btn btn-neutral float-right" title="TermTk.TTkCore.ttk" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021, Eugenio Parodi.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>