view mod_statistics_cputotal/mod_statistics_cputotal.lua @ 4854:ee2463fbf794

mod_default_bookmarks: Abort on incompatible mod_bookmarks The module formerly known as mod_bookmarks exposed this publish_to_pep function, while the new mod_bookmarks2 (called mod_bookmarks in trunk) does not.
author Kim Alvefur <zash@zash.se>
date Fri, 07 Jan 2022 23:25:33 +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
		}
	}
});