Skip to content

Commit 28ca1e8

Browse files
authored
Fix AnyEvent->timer call (i3#3008)
And make the remaining AnyEvent->condvar and AnyEvent->timer calls consistent.
1 parent 464c158 commit 28ca1e8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

testcases/t/268-ipc-config.t

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ get_socket_path(0);
4242
my $i3 = i3(get_socket_path());
4343
$i3->connect->recv;
4444

45-
my $cv = AE::cv;
46-
my $timer = AE::timer 0.5, 0, sub { $cv->send(0); };
45+
my $cv = AnyEvent->condvar;
46+
my $timer = AnyEvent->timer(after => 0.5, interval => 0, cb => sub { $cv->send(0); });
4747

4848
my $last_config = $i3->get_config()->recv;
4949
chomp($last_config->{config});

testcases/t/289-ipc-shutdown-event.t

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ my $i3 = i3(get_socket_path());
3030
$i3->connect->recv;
3131

3232
my $cv = AnyEvent->condvar;
33-
my $timer = AE::timer 0.5, 0, sub { $cv->send(0); };
33+
my $timer = AnyEvent->timer(after => 0.5, interval => 0, cb => sub { $cv->send(0); });
3434

3535
$i3->subscribe({
3636
shutdown => sub {
@@ -51,7 +51,7 @@ $i3 = i3(get_socket_path());
5151
$i3->connect->recv;
5252

5353
$cv = AnyEvent->condvar;
54-
$timer = AE::timer 0.5, 0, sub { $cv->send(0); };
54+
$timer = AnyEvent->timer(after => 0.5, interval => 0, cb => sub { $cv->send(0); });
5555

5656
$i3->subscribe({
5757
shutdown => sub {

testcases/t/525-i3bar-mouse-bindings.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ $i3->connect()->recv;
3939
my $ws = fresh_workspace;
4040

4141
my $cv = AnyEvent->condvar;
42-
my $timer = AnyEvent->timer(1, 0, sub { $cv->send(0) });
42+
my $timer = AnyEvent->timer(after => 1, interval => 0, cb => sub { $cv->send(0) });
4343
$i3->subscribe({
4444
window => sub {
4545
my ($event) = @_;

0 commit comments

Comments
 (0)