stas        01/10/09 09:48:31

  Modified:    ModPerl-Registry/t closure.t
  Log:
  - using select() instead of sleep to gain 1 sec delay granularity, needed
  for -M to notice that the file was modified
  
  Revision  Changes    Path
  1.2       +4 -1      modperl-2.0/ModPerl-Registry/t/closure.t
  
  Index: closure.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/closure.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- closure.t 2001/10/09 12:47:38     1.1
  +++ closure.t 2001/10/09 16:48:31     1.2
  @@ -119,7 +119,10 @@
   
   sub sleep_and_touch_file {
       my $file = shift;
  -    sleep 2; # so -M will be different, res: 1 sec, granularity > 1sec
  +    # need to wait at least 1 whole sec, so -M will notice the
  +    # difference. select() has better resolution than 1 sec as in
  +    # sleep()
  +    select undef, undef, undef, 1.00; # sure 1 sec
       my $now = time;
       utime $now, $now, $file;
   }
  
  
  


Reply via email to