rrthomas/luaposix — pull request #41 by gvvaughan (2012-05-29 16:19:11+00:00)
Title: gettimeofday: change format to a table with sec and usec fields.

* lposix.c (Pgettimeofday): Return a single table with sec and usec
fields, rather than a pair of numbers.
(Ptimeradd, Ptimercmp, Ptimersub): New functions to emulate the
macros timeradd, timercmp and timersub respectively.

While timeradd, timercmp and timersub are not in strict posix, coding
them by hand as a separate loadable module, or in lua is required to
do anything worthwhile with the numbers that come out of gettimeofday.

Please include in upstream, so we don't need a honking great blob of
extra glue to use gettimeofday() timers efficiently in Lua Zile...