Replace busy loop with usleep call
Replace busy loop with usleep call

tests/glib.lua counts to one million in an attempt to spend some time so
that it can test that GLib's Timer correctly nootices that some
timepassed. The "count to one million"-loop needs about three
milliseconds here with Lua 5.2. LuaJIT is likely faster than this.

Instead of relying on this loop being slow enough, replace it with a
call to g_usleep to sleep for a millisecond.

Signed-off-by: Uli Schlachter <346c0ad49ac8427b61b3b55abbe37dc0ebd524f2@znc.in>

pavouk/lgi,psychon/lgi