ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.176 by root, Wed Aug 20 12:37:21 2008 UTC vs.
Revision 1.179 by root, Thu Sep 4 10:58:58 2008 UTC

854no warnings; 854no warnings;
855use strict; 855use strict;
856 856
857use Carp; 857use Carp;
858 858
859our $VERSION = 4.231; 859our $VERSION = 4.233;
860our $MODEL; 860our $MODEL;
861 861
862our $AUTOLOAD; 862our $AUTOLOAD;
863our @ISA; 863our @ISA;
864 864
1016 1016
1017package AnyEvent::Base; 1017package AnyEvent::Base;
1018 1018
1019# default implementation for now and time 1019# default implementation for now and time
1020 1020
1021use Time::HiRes (); 1021BEGIN {
1022 if (eval "use Time::HiRes (); time (); 1") {
1023 *_time = \&Time::HiRes::time;
1024 # if (eval "use POSIX (); (POSIX::times())...
1025 } else {
1026 *_time = \&CORE::time; # epic fail
1027 }
1028}
1022 1029
1023sub time { Time::HiRes::time } 1030sub time { _time }
1024sub now { Time::HiRes::time } 1031sub now { _time }
1025 1032
1026# default implementation for ->condvar 1033# default implementation for ->condvar
1027 1034
1028sub condvar { 1035sub condvar {
1029 bless { @_ == 3 ? (_ae_cb => $_[2]) : () }, AnyEvent::CondVar:: 1036 bless { @_ == 3 ? (_ae_cb => $_[2]) : () }, AnyEvent::CondVar::

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines