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