Software /
code /
prosody
File
util/time.lua @ 9117:a19fdc6e4f09
util.pubsub: Apply defaults metatable before config check (thanks pep.)
Makes it so that the callback sees the default if it’s not in the form,
which makes it easier to validate.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 05 Aug 2018 15:17:00 +0200 |
parent | 7461:72e48bddf617 |
line wrap: on
line source
-- Import gettime() from LuaSocket, as a way to access high-resolution time -- in a platform-independent way local socket_gettime = require "socket".gettime; return { now = socket_gettime; }