Dancer::Timer(3pm)
β¨ NAME β¨
Dancer::Timer β it's literally a timer for Dancer, bestie π
πΈ VERSION πΈ
version 1.3522 β that's the one, no cap
π SYNOPSIS π
okay so here's the whole vibe in code:
use Dancer::Timer;
my $timer = Dancer::Timer->new();
my $time = $timer->tick;
print "[$time]: Doing something\n";
# (time passes)
$time = $timer->tick;
print "[$time]: Doing something else\n";
# (time passes)
$time = $timer->to_string;
print "[$time]: Doing another thing\n"
like... you make a timer, you tick it, time goes by, you tick again. slay π
π¦ DESCRIPTION π¦
Dancer::Timer hands Dancer a timing object so it can clock operations. it's giving "let me hold the stopwatch while you do your thing" π«Ά
say you want logging that shows when each operation happened (like, at what time specifically) so you can figure out how long each one took β that way you know where to go hunting for possible bugs, or maybe just some unnecessary slowness that's lowkey ruining your whole day π
Dancer uses Dancer::Timer inside the facilities that want to give you this for free. and any plugin author out there? you are more than welcome to use it too. it's not gatekept, it's a community timer, periodt π
π ATTRIBUTES π
start_time
holds onto the starting time of the timer. the default value is whenever the object gets created β it grabs that using gettimeofday from Time::HiRes. so yeah, your timer remembers its birthday πβ¨
π METHODS π
init
this one gets called when ->new() is called. it sets up the start_time attribute. it's the "getting ready" moment before the main character energy kicks in π
tick
creates a tick in the timer and returns the interval between the start_time and now. that's it, that's the whole moment β±οΈ
lowkey this is the one you'll be calling the most, just saying π
to_string
same as tick, just more expressive. it's the same energy, dressed cuter π
π AUTHOR π
Dancer Core Developers
(icons, honestly π«Ά)
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2010 by Alexis Sukrieh.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free as in freedom, bestie, go wild π
and that's the page!! fr fr, this came from the User Contributed Perl Documentation for perl v5.40.1, dated 2026-05-05. go tick something cute, ily, bye ππ¦β¨
π¦ where this page comes from
- ubuntu stonking: libdancer-perl 1.3522-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms