<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Python_Implementation_of_ref_time</id>
	<title>Python Implementation of ref time - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Python_Implementation_of_ref_time"/>
	<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Python_Implementation_of_ref_time&amp;action=history"/>
	<updated>2026-05-18T12:19:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://performiq.com/kb/index.php?title=Python_Implementation_of_ref_time&amp;diff=1992&amp;oldid=prev</id>
		<title>PeterHarding: New page: &lt;pre&gt; #=====================================================================  def the_time():    t = float(ref_time(FALSE)) * 0.001     return t  #-----------------------------------------...</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Python_Implementation_of_ref_time&amp;diff=1992&amp;oldid=prev"/>
		<updated>2008-04-30T07:56:13Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;lt;pre&amp;gt; #=====================================================================  def the_time():    t = float(ref_time(FALSE)) * 0.001     return t  #-----------------------------------------...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#=====================================================================&lt;br /&gt;
&lt;br /&gt;
def the_time():&lt;br /&gt;
   t = float(ref_time(FALSE)) * 0.001&lt;br /&gt;
&lt;br /&gt;
   return t&lt;br /&gt;
&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
def ref_time(flg):&lt;br /&gt;
   global start&lt;br /&gt;
&lt;br /&gt;
   curr = datetime.now()&lt;br /&gt;
&lt;br /&gt;
   if (flg):&lt;br /&gt;
      start  = curr&lt;br /&gt;
      t      = 0&lt;br /&gt;
   else:&lt;br /&gt;
      microsecond = (curr.microsecond - start.microsecond)&lt;br /&gt;
      second      = ((curr.second     - start.second) * 1000000)&lt;br /&gt;
      t           = (second + microsecond)/1000&lt;br /&gt;
&lt;br /&gt;
   return t&lt;br /&gt;
&lt;br /&gt;
#=====================================================================&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
</feed>