--- loncom/lonnet/perl/lonnet.pm 2015/06/12 21:11:20 1.1288 +++ loncom/lonnet/perl/lonnet.pm 2015/06/16 20:24:59 1.1289 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1288 2015/06/12 21:11:20 damieng Exp $ +# $Id: lonnet.pm,v 1.1289 2015/06/16 20:24:59 damieng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -92,7 +92,7 @@ use GDBM_File; use HTML::LCParser; use Fcntl qw(:flock); use Storable qw(thaw nfreeze); -use Time::HiRes qw( gettimeofday tv_interval ); +use Time::HiRes qw( sleep gettimeofday tv_interval ); use Cache::Memcached; use Digest::MD5; use Math::Random; @@ -101,7 +101,6 @@ use LONCAPA qw(:DEFAULT :match); use LONCAPA::Configuration; use LONCAPA::lonmetadata; use LONCAPA::Lond; -use Time::HiRes qw(sleep); use File::Copy; @@ -376,7 +375,7 @@ sub subreply { my $lockfile=$peerfile.".lock"; while (-e $lockfile) { # Need to wait for the lockfile to disappear. - Time::HiRes::sleep(0.1); + sleep(0.1); } # At this point, either a loncnew parent is listening or an old lonc # or loncnew child is listening so we can connect or everything's dead. @@ -394,7 +393,7 @@ sub subreply { } else { &create_connection(&hostname($server),$server); } - Time::HiRes::sleep(0.1); # Try again later if failed connection. + sleep(0.1); # Try again later if failed connection. } my $answer; if ($client) { @@ -7679,7 +7678,7 @@ sub get_query_reply { my $replyfile=LONCAPA::tempdir().$queryid; my $reply=''; for (1..100) { - Time::HiRes::sleep(0.2); + sleep(0.2); if (-e $replyfile.'.end') { if (open(my $fh,$replyfile)) { $reply = join('',<$fh>); @@ -9524,7 +9523,7 @@ sub modify_access_controls { while (($gotlock ne 'ok') && $tries < 10) { $tries ++; - Time::HiRes::sleep(0.1); + sleep(0.1); $gotlock = &newput('file_permissions',$lockhash,$domain,$user); } if ($gotlock eq 'ok') {