Changeset

7988:dc758422d896

util.statistics,statsd,throttle,timer: Replace dependency on LuaSockect with util.time for precision time
author Kim Alvefur <zash@zash.se>
date Mon, 20 Mar 2017 00:48:28 +0100
parents 7987:b3ee697158b5
children 7989:5632aa85e0b6 7991:35a02ba83af2
files util/statistics.lua util/statsd.lua util/throttle.lua util/timer.lua
diffstat 4 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/util/statistics.lua	Sat Mar 18 18:50:17 2017 +0100
+++ b/util/statistics.lua	Mon Mar 20 00:48:28 2017 +0100
@@ -1,6 +1,6 @@
 local t_sort = table.sort
 local m_floor = math.floor;
-local time = require "socket".gettime;
+local time = require "util.time".now;
 
 local function nop_function() end
 
--- a/util/statsd.lua	Sat Mar 18 18:50:17 2017 +0100
+++ b/util/statsd.lua	Mon Mar 20 00:48:28 2017 +0100
@@ -1,6 +1,6 @@
 local socket = require "socket";
 
-local time = require "socket".gettime;
+local time = require "util.time".now
 
 local function new(config)
 	if not config or not config.statsd_server then
--- a/util/throttle.lua	Sat Mar 18 18:50:17 2017 +0100
+++ b/util/throttle.lua	Mon Mar 20 00:48:28 2017 +0100
@@ -1,5 +1,5 @@
 
-local gettime = require "socket".gettime;
+local gettime = require "util.time".now
 local setmetatable = setmetatable;
 local floor = math.floor;
 
--- a/util/timer.lua	Sat Mar 18 18:50:17 2017 +0100
+++ b/util/timer.lua	Mon Mar 20 00:48:28 2017 +0100
@@ -9,7 +9,7 @@
 local server = require "net.server";
 local math_min = math.min
 local math_huge = math.huge
-local get_time = require "socket".gettime;
+local get_time = require "util.time".now
 local t_insert = table.insert;
 local pairs = pairs;
 local type = type;