view mod_statistics_cputotal/mod_statistics_cputotal.lua @ 1386:4557ac5c205d

mod_statistics_cputotal: Make global
author Kim Alvefur <zash@zash.se>
date Sat, 19 Apr 2014 15:16:19 +0200
parents aa371405db34
children
line wrap: on
line source

-- Provides total CPU time, useful for DERIVE

module:set_global();

module:provides("statistics", {
	statistics = {
		cpu_total = { -- milliseconds of CPU time used
			get = function()
				return os.clock() * 1000;
			end
		}
	}
});