use sleep with fractions, not usleep

This commit is contained in:
Michael Stapelberg 2009-07-23 01:14:36 +02:00
parent dba1612655
commit 730508057c
1 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ use X11::XCB qw(:all);
# We use relatively long sleeps (1/4 second) to make sure the window manager # We use relatively long sleeps (1/4 second) to make sure the window manager
# reacted. # reacted.
use Time::HiRes qw(usleep); use Time::HiRes qw(sleep);
BEGIN { BEGIN {
use_ok('X11::XCB::Window'); use_ok('X11::XCB::Window');
@ -30,17 +30,17 @@ is_deeply($window->rect, $original_rect, "rect unmodified before mapping");
$window->create; $window->create;
$window->map; $window->map;
usleep(0.25); sleep(0.25);
my $new_rect = $window->rect; my $new_rect = $window->rect;
ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned"); ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned");
$original_rect = $new_rect; $original_rect = $new_rect;
usleep(0.25); sleep(0.25);
$window->fullscreen(1); $window->fullscreen(1);
usleep(0.25); sleep(0.25);
$new_rect = $window->rect; $new_rect = $window->rect;
ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned after fullscreen"); ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned after fullscreen");