diff options
Diffstat (limited to 'docs/manual/mod/mod_lua.xml')
-rw-r--r-- | docs/manual/mod/mod_lua.xml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/manual/mod/mod_lua.xml b/docs/manual/mod/mod_lua.xml index fb28dc18b9..ee617d99b2 100644 --- a/docs/manual/mod/mod_lua.xml +++ b/docs/manual/mod/mod_lua.xml @@ -633,7 +633,7 @@ r:flush() -- flushes the output buffer. while we_have_stuff_to_send do r:puts("Bla bla bla\n") -- print something to client r:flush() -- flush the buffer (send to client) - r:sleep(0.5) -- fake processing time and repeat + r.usleep(500000) -- fake processing time for 0.5 sec. and repeat end </highlight> @@ -894,8 +894,7 @@ local matches = r:regex("FOO bar BAz", [[(foo) bar]], 1) </highlight> <highlight language="lua"> -r:sleep(number_of_seconds) -- Puts the script to sleep for a given number of seconds. - -- This can be a floating point number like 1.25 for extra accuracy. +r.usleep(number_of_microseconds) -- Puts the script to sleep for a given number of microseconds. </highlight> <highlight language="lua"> |