2 pages tagged with "time"
Packing timeval
December 05, 2012
<p>Recently I got a lot of failures from CPAN Testers for RedisDB on NetBSD i386.
After investigating a bit I've found that <a
href="http://www.netbsd.org/releases/formal-6/NetBSD-6.0.html">NetBSD 6.0</a>
comes now with 64-bit <code>time_t</code> on all architectures. It means that the
way I used to pack <code>struct timeval</code> value to set timeout on socket,
didn't work anymore. Previously it was the same as <code>long, long</code> on all
systems and pack looked like this…
</p>
read more
Catching a Leap Second
January 01, 2009
<p>As you may know there is such a thing as <a href="https://en.wikipedia.org/wiki/Leap_second">a leap second</a>, and Dec 31 2008 is a day with a leap second. A couple of hours before New Year I got an idea to catch this leap second.</p>
<p>The problem is that Linux uses Unix time and thus ignores leap seconds. Hence if you use time(2) or gettimeofday(2), the leap second is just a repetition of the previous second. Here's the program I used to catch the leap second…
</p>
read more