Added lume.time(), incremented version revision

This commit is contained in:
rxi
2014-02-28 19:39:29 +00:00
parent 29acc4accc
commit 0d85bd630f
2 changed files with 15 additions and 1 deletions

View File

@@ -149,6 +149,13 @@ local f = lume.fn(print, "Hello")
f() -- Prints "Hello"
```
### lume.time(fn, ...)
Inserts the arguments into function `fn` and calls it. Returns the time in
seconds the function `fn` took to execute followed by `fn`'s returned values.
```lua
lume.time(function(x) return x end, "hello") -- Returns 0, "hello"
```
### lume.serialize(x)
Serializes the argument `x` into a string which can be loaded again using
`lume.deserialize()`. Only booleans, numbers, tables and strings can be