lua-users home
lua-l archive

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



I like your description. Also, test code (in Lua) should be attached to it, so all implementations share the same module test, in an XP 'write tests first' manner. If the test runs, the implementation's possibly ok, too.

-ak

5.8.2004 kello 09:37, Rici Lake kirjoitti:

 * os.delay(t, interruptable)

  sleeps for approximately t seconds. Returns a true value; if the
  return value is numeric, it will be the actual duration of the sleep.
  If the second argument is a true value, the function may return
  earlier than the indicated time interval as the result of a signal
  being received.

  If this function fails, it returns nil plus a string describing the
  error. In particular, os.delay(0, true) will return an error if the
  operating system is not capable of interrupting delays, and
  os.delay(0) will return an error if the os library does not
  implement delay.