Lots of consting
[p5sagit/p5-mst-13.2.git] / t / op / sleep.t
1 #!./perl
2
3 use strict;
4 use warnings;
5 use Test::More tests=>4;
6
7 my $start = time;
8 my $sleep_says = sleep 3;
9 my $diff = time - $start;
10
11 cmp_ok( $sleep_says, '>=', 2,  'Sleep says it slept at least 2 seconds' );
12 cmp_ok( $sleep_says, '<=', 10, '... and no more than 10' );
13
14 cmp_ok( $diff, '>=', 2,  'Actual time diff is at least 2 seconds' );
15 cmp_ok( $diff, '<=', 10, '... and no more than 10' );