use DBIx::Class::Carp;
use DBIx::Class::_Util 'dbic_internal_try';
-use Time::HiRes qw/gettimeofday/;
use Scalar::Util 'weaken';
use namespace::clean;
# not possible to format the string sanely, as the column is a varchar(20).
# The 'v' character is added to the front of the string, so that any version
# formatted by this new function will sort _after_ any existing 200... strings.
- my @tm = gettimeofday();
+ require Time::HiRes;
+ my @tm = Time::HiRes::gettimeofday();
my @dt = gmtime ($tm[0]);
my $o = $vtable->new_result({
version => $version,
use strict;
use warnings;
use Test::More;
-use Time::HiRes qw/gettimeofday/;
-
use DBICTest; # do not remove even though it is not used
is (DBICTest::NS::Stress::Schema->sources, 0, 'Start with no sources');
-
-note gettimeofday . ":\tload_namespaces start";
DBICTest::NS::Stress::Schema->load_namespaces;
-note gettimeofday . ":\tload_namespaces finished";
is (DBICTest::NS::Stress::Schema->sources, $src_count, 'All sources attached');
use base qw(DBICTest::Base DBIx::Class::Schema);
use Fcntl qw(:DEFAULT :seek :flock);
-use Time::HiRes 'sleep';
use DBIx::Class::_Util 'scope_guard';
use DBICTest::Util::LeakTracer qw(populate_weakregistry assert_empty_weakregistry);
use DBICTest::Util qw( local_umask tmpdir await_flock dbg DEBUG_TEST_CONCURRENCY_LOCKS );
for (1..50) {
kill (0, $old_pid) or last;
- sleep 0.1;
+ select( undef, undef, undef, 0.1 );
}
DEBUG_TEST_CONCURRENCY_LOCKS
use Test::More;
use File::Find;
-use Time::HiRes 'sleep';
my $worker = sub {
my $fn = shift;
if (DBIx::Class::_ENV_::BROKEN_FORK) {
# older perls crash if threads are spawned way too quickly, sleep for 100 msecs
my $t = threads->create(sub { $worker->($_) });
- sleep 0.1;
+ select( undef, undef, undef, 0.1);
is ($t->join, 42, "Thread loading $_ did not finish successfully")
|| diag ($t->can('error') ? $t->error : 'threads.pm too old to retrieve the error :(' );
}