view mod_statistics_cputotal/mod_statistics_cputotal.lua @ 4748:a6b94f4fb065

mod_rest: Correct unused reference $ref isn't supported yet, and this might not be the correct syntax, but now follows the other (un-)uses.
author Kim Alvefur <zash@zash.se>
date Thu, 04 Nov 2021 20:19:31 +0100
parents 4557ac5c205d
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
		}
	}
});