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.178 by root, Thu Aug 21 23:48:35 2008 UTC vs.
Revision 1.179 by root, Thu Sep 4 10:58:58 2008 UTC

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