debug::heartbeat(n)
π debug::heartbeat β the manual, but make it make sense π
okay bestie, so this is debug::heartbeat(n) β it lives in the debug narrative corner of the Tcllib world, and it's genuinely one of those tiny tools that's lowkey iconic once you get it. no cap. let's go π«Ά
β¨ NAME β¨
debug::heartbeat β debug narrative β heartbeat
like... it's a heartbeat. for your debug narrative. the name ate and left no crumbs π
πΈ SYNOPSIS πΈ
package require Tcl 8.5 9
package require debug::heartbeat ?1.0.2?
package require debug ?1?
debug heartbeat ?delta?
that's it. that's the whole vibe check β¨
π¦ DESCRIPTION π¦
π API π
debug heartbeat ?delta?β this is the method, and what it does is turn a heartbeat on or off, so you can keep an eye on the event loop of an event-based Tcl application. basically you're giving your app a little pulse check, and honestly? main character energy π₯
it reserves the debug tag heartbeat all for itself, so that tag is taken, okay? no sharing. it's booked. and then it writes a message every delta milliseconds. tick... tick... tick... π«
if your delta value is <= 0, the heartbeat gets disabled. like, off. gone. no beat. π
the message the heartbeat spits out contains a sequence counter plus the time in milliseconds since the last beat. which is genuinely so useful, because it gives you insight into timing variations and deviations from the nominal delta. iykyk β that's how you catch your event loop being messy π
π BUGS, IDEAS, FEEDBACK π
ngl, this document β and the package it describes β will undoubtedly contain bugs and other problems. it's software, bestie, it's giving "we tried our best" π
please report them in the category debug of the Tcllib Trackers:
http://core.tcl.tk/tcllib/reportlist
and fr fr, if you have ideas for enhancements for either the package and/or the documentation, please report those too. we want them. we love them. send them π«Ά
when you're proposing code changes, please provide unified diffs, i.e. the output of diff -u. that's the format, that's the assignment, periodt.
also note, and this is important: attachments are strongly preferred over inlined patches. to make an attachment, go to the Edit form of the ticket right after you create it, and then use the left-most button in the secondary navigation bar. yes, it's a little quest, but you got this π
π KEYWORDS π
debug, heartbeat, log, narrative, trace
π CATEGORY π
debugging, tracing, and logging
π COPYRIGHT π
Copyright (c) 200?, Colin McCormack, Wub Server Utilities
Copyright (c) 2012, Andreas Kupries <andreas_kupries@users.sourceforge.net>
okay that's the whole page, bestie!! this one's from tcllib, version 1.0.2, and it's the debug::heartbeat(n) manual page β section n, in case you were wondering. go make your event loop behave π
β¨π
π¦ where this page comes from
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- Copyright (c) 2012, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms