lua-users home
lua-l archive

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

Today I was testing some simple socket programming with lua,
and I ran a server on Linode-512 which is a Archlinux installation.
The Lua version on my server is 5.1.4, installed using pacman.

I use os.clock() to time how fast I want to send out a packet,
and somehow the server just sends nothing back to the client
no matter what I tried.

And to my surprise, the tick returned by os.clock() is moving
extremely slow, and if I make a burst of thousands of calls to
os.clock(), it'll move a little bit faster (like 0.01 -> 0.02 -> 0.03
every few "REAL" seconds), otherwise it'll simply return 0, as if
the difference in time is not reportable by the function.

What might be causing this? I am really confused. :(