MCPcopy Create free account
hub / github.com/NetHack/NetHack / timer_stats

Function timer_stats

src/timeout.c:2731–2745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2729
2730#ifndef SFCTOOL
2731DISABLE_WARNING_FORMAT_NONLITERAL
2732
2733/* to support '#stats' wizard-mode command */
2734void
2735timer_stats(const char *hdrfmt, char *hdrbuf, long *count, long *size)
2736{
2737 timer_element *te;
2738
2739 Sprintf(hdrbuf, hdrfmt, (long) sizeof (timer_element));
2740 *count = *size = 0L;
2741 for (te = gt.timer_base; te; te = te->next) {
2742 ++*count;
2743 *size += (long) sizeof *te;
2744 }
2745}
2746
2747RESTORE_WARNING_FORMAT_NONLITERAL
2748

Callers 1

misc_statsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected