about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-01-12 21:17:49 +0000
committerEric Wong <e@yhbt.net>2020-01-13 23:21:23 +0000
commiteb9c415ba4421cecb5157967c843dc7f8720e916 (patch)
tree56476dbfeb4989c9ff272a6cf0a1d50cb3200ca2 /lib
parentf0da3ed7de7ad6b8edfa9f1c4242747d6a864a23 (diff)
downloadpublic-inbox-eb9c415ba4421cecb5157967c843dc7f8720e916.tar.gz
ds: remove Timer->cancel and Timer class+bless
It doesn't seem needed at the moment, and we can re-add it
in the future if needed.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/DS.pm11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm
index b441adc9..cea25d90 100644
--- a/lib/PublicInbox/DS.pm
+++ b/lib/PublicInbox/DS.pm
@@ -106,16 +106,13 @@ sub SetLoopTimeout {
 Add a timer to occur $seconds from now. $seconds may be fractional, but timers
 are not guaranteed to fire at the exact time you ask for.
 
-Returns a timer object which you can call C<< $timer->cancel >> on if you need
-to.
-
 =cut
 sub add_timer ($$) {
     my ($secs, $coderef) = @_;
 
     my $fire_time = now() + $secs;
 
-    my $timer = bless [$fire_time, $coderef], "PublicInbox::DS::Timer";
+    my $timer = [$fire_time, $coderef];
 
     if (!@Timers || $fire_time >= $Timers[-1][0]) {
         push @Timers, $timer;
@@ -693,12 +690,6 @@ sub not_idle_long {
     $exp_at > $now;
 }
 
-package PublicInbox::DS::Timer;
-# [$abs_float_firetime, $coderef];
-sub cancel {
-    $_[0][1] = undef;
-}
-
 1;
 
 =head1 AUTHORS (Danga::Socket)