From bce60be30fe8e9c1b0eb33128c23c93d7bca5303 Mon Sep 17 00:00:00 2001
From: Diego Nehab
+socket.gettime()
+
+Returns the time in seconds, relative to the origin of the
+universe. You should subtract the values returned by this function
+to get meaningful values.
+
@@ -199,6 +217,15 @@ themselves, to simplify the test if a specific socket has
changed status.
+Note: : select can monitor a limited number
+of sockets, as defined by the constant socket._SETSIZE. This
+number may be as high as 1024 or as low as 64 by default,
+depending on the system. It is usually possible to change this
+at compile time. Invoking select with a larger
+number of sockets will raise an error.
+
Important note: a known bug in WinSock causes select to fail
on non-blocking TCP sockets. The function may return a socket as
@@ -288,8 +315,8 @@ Freezes the program execution during a given amount of time.
-Time is the number of seconds to sleep for.
-The function truncates time down to the nearest integer.
+Time is the number of seconds to sleep for. If
+time is negative, the function returns immediately.
+t = socket.gettime()
+-- do stuff
+print(socket.gettime() - t .. " seconds elapsed")
+
+
-socket.gettime() +
+socket._SETSIZE
-Returns the time in seconds, relative to the origin of the -universe. You should subtract the values returned by this function -to get meaningful values. +The maximum number of sockets that the select function can handle.
--t = socket.gettime() --- do stuff -print(socket.gettime() - t .. " seconds elapsed") --
@@ -386,8 +406,8 @@ This constant has a string describing the current LuaSocket version.