diff options
author | Diego Nehab <diego.nehab@gmail.com> | 2016-03-04 15:36:32 -0300 |
---|---|---|
committer | Diego Nehab <diego.nehab@gmail.com> | 2016-03-04 15:36:32 -0300 |
commit | 944305dc21350fd2ec32a9552d893da86894fd62 (patch) | |
tree | 82948c24dade5e0da6924ab5e706f146bce4692a /src/timeout.c | |
parent | cdce73b226cc4da6a073b79bec02a6780d32ff1a (diff) | |
download | luasocket-944305dc21350fd2ec32a9552d893da86894fd62.tar.gz luasocket-944305dc21350fd2ec32a9552d893da86894fd62.tar.bz2 luasocket-944305dc21350fd2ec32a9552d893da86894fd62.zip |
Added gettimeout for completeness.
Also documented.
Rordered manuals so order is alphabetical.
Diffstat (limited to 'src/timeout.c')
-rw-r--r-- | src/timeout.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/timeout.c b/src/timeout.c index 087d033..5a601d5 100644 --- a/src/timeout.c +++ b/src/timeout.c | |||
@@ -173,6 +173,16 @@ int timeout_meth_settimeout(lua_State *L, p_timeout tm) { | |||
173 | return 1; | 173 | return 1; |
174 | } | 174 | } |
175 | 175 | ||
176 | /*-------------------------------------------------------------------------*\ | ||
177 | * Gets timeout values for IO operations | ||
178 | * Lua Output: block, total | ||
179 | \*-------------------------------------------------------------------------*/ | ||
180 | int timeout_meth_gettimeout(lua_State *L, p_timeout tm) { | ||
181 | lua_pushnumber(L, tm->block); | ||
182 | lua_pushnumber(L, tm->total); | ||
183 | return 2; | ||
184 | } | ||
185 | |||
176 | /*=========================================================================*\ | 186 | /*=========================================================================*\ |
177 | * Test support functions | 187 | * Test support functions |
178 | \*=========================================================================*/ | 188 | \*=========================================================================*/ |