<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.skytech.dk/index.php?action=history&amp;feed=atom&amp;title=Perl_-_log_with_finer_timestaps_%28milliseconds%29</id>
	<title>Perl - log with finer timestaps (milliseconds) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.skytech.dk/index.php?action=history&amp;feed=atom&amp;title=Perl_-_log_with_finer_timestaps_%28milliseconds%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.skytech.dk/index.php?title=Perl_-_log_with_finer_timestaps_(milliseconds)&amp;action=history"/>
	<updated>2026-04-03T20:59:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.skytech.dk/index.php?title=Perl_-_log_with_finer_timestaps_(milliseconds)&amp;diff=1527&amp;oldid=prev</id>
		<title>80.166.222.82 at 08:26, 13 October 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.skytech.dk/index.php?title=Perl_-_log_with_finer_timestaps_(milliseconds)&amp;diff=1527&amp;oldid=prev"/>
		<updated>2008-10-13T08:26:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Linux]]&lt;br /&gt;
&lt;br /&gt;
Create the logger subrutine and just call it with &amp;amp;logStuff(...)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;And remember to add the needed module in the top!!&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
use Time::HiRes qw ( gettimeofday );&lt;br /&gt;
&lt;br /&gt;
[....]&lt;br /&gt;
&lt;br /&gt;
sub logStuff&lt;br /&gt;
{&lt;br /&gt;
        my $sFile = &amp;#039;/usr/lib/postgresql/8.3/bin/logs/sync_timer.log&amp;#039;;&lt;br /&gt;
        my $sData = shift;&lt;br /&gt;
        open (debuglogger, &amp;quot;&amp;gt;&amp;gt;$sFile&amp;quot;);&lt;br /&gt;
        my ($s, $usec) = gettimeofday();&lt;br /&gt;
        my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);&lt;br /&gt;
        print debuglogger &amp;quot;$hour:$min:$sec.$usec:\t$sData\n&amp;quot;;&lt;br /&gt;
        close (debuglogger);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>80.166.222.82</name></author>
	</entry>
</feed>