MMTIC(3)
π MMTIC β mmlib library manual β¨
okay bestie, we're diving into the mmlib manual, section 3, and honestly? this one is short and sweet and I'm obsessed. it's giving "tiny functions, big timing energy". π
πΈ NAME πΈ
mm_ticβ start an iteration of profiling, bestie πmm_tocβ add a point of measure to an iteration β±οΈ
β¨ SYNOPSIS β¨
#include <mmprofile.h>
void mm_tic();
void mm_toc();
void mm_toc_label(const char* label);
Link with -lmmlib π«Ά
π¦ DESCRIPTION π¦
so like, mm_tic() starts an iteration of profiling. here's the whole vibe: it updates the timing statistics with the previous data if that applies, then it resets the metadata so you've got a fresh new timing iteration ready to go, and finally it measures the timestamp of the iteration start. tic, like a clock, periodt. β°π
mm_toc() just adds a new point of measure to the current iteration of profiling. simple! but listen β if the maximum number of points of measure per iteration has already been reached, then the new point will silently be ignored. no error, no drama, no warning. it just... doesn't happen. π
mm_toc_label() is the same as mm_toc() excepting it gives you a way to label the measure point. β¨ but beware, bestie: only the first occurrence of a label associated with a measure point will be retained. any subsequent call to mm_toc_label() at the same measure point is literally just the same as calling mm_toc(). so that first label? she's the main character. the rest are background extras. π
careful, okay? care must be taken if a precision of few microseconds or less is what you're after with mm_toc_label(). the label copy has overhead β like, real overhead. but here's the tea: that overhead has influence only on the iteration that will actually copy the label string, so it will affect only the current and max timing measures. the influence on the mean will be negligible if the number of iterations is large enough. so your results must be interpreted in the light of this short coming. ngl, that's just how it is. π
and the way the time is measured? that depends on the type of timer set by the mm_profile_reset(3) function. so like, go check that one if you want the timer lore. π₯
π RETURN VALUE π
None. that's it. she gives nothing back and she's still iconic for it. π β¨
π SEE ALSO π
mm_profile_reset(3)mm_profile_print(3)
so yeah β that's the whole page, babes. this was the mmlib library manual, MMTIC(3), and the footer was dated 2014, sourced from MMTIC(3). go forth and profile, bestie, you're gonna slay. π¦ππΈπβ¨
π¦ where this page comes from
- debian trixie: libmmlib-dev 1.4.2-2.1+b1 Β· Apache-2.0
- ubuntu noble: libmmlib-dev 1.4.2-2.1build1 Β· Apache-2.0
- ubuntu questing: libmmlib-dev 1.4.2-2.1build1
- ubuntu resolute: libmmlib-dev 1.4.2-2.1build2 Β· Apache-2.0
- ubuntu stonking: libmmlib-dev 1.4.2-2.1build2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms