lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I think you have tiny bug here:

  lua_pushnumber(L, ( get_time( MSEC ) + get_time( SEC ) ) );

and also here:

  lua_pushnumber( L, ( ( get_time( MSEC ) + get_time( SEC ) ) - v1 ) );

What if the current second changes between the two calls to get_time?
Rare, maybe, but not impossible.

Lint-checking is fun :)

-Stefan

On Mon, Oct 10, 2011 at 8:09 PM, Francisco <xxleite@gmail.com> wrote:
> Hello list,
> lua-time is a simple and small library that provides some time methods that
> are lacking on standart library. https://github.com/leite/lua-time
> --
> xxleite@gmail.com
> cel.: (11) 7531.7438
> site: about.leite.us
>