Hello community, here is the log from the commit of package perl-Event checked in at Fri Sep 12 18:10:13 CEST 2008. -------- --- perl-Event/perl-Event.changes 2007-07-17 12:00:35.000000000 +0200 +++ /mounts/work_src_done/STABLE/perl-Event/perl-Event.changes 2008-09-12 17:46:52.392787000 +0200 @@ -1,0 +2,9 @@ +Fri Sep 12 17:42:34 CEST 2008 - garloff@suse.de + +- Update to 1.11: + * bugfix in db_show_timeables + * times are now using NV type + * Moved idle2 testcase to demos + * io testcase fixed for Darwin + +------------------------------------------------------------------- Old: ---- Event-1.09.tar.bz2 New: ---- Event-1.11.tar.bz2 perl-Event-1.11-rpmlintrc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Event.spec ++++++ --- /var/tmp/diff_new_pack.OD5593/_old 2008-09-12 18:10:04.000000000 +0200 +++ /var/tmp/diff_new_pack.OD5593/_new 2008-09-12 18:10:04.000000000 +0200 @@ -1,24 +1,34 @@ # -# spec file for package perl-Event (Version 1.09) +# spec file for package perl-Event (Version 1.11) # -# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild +Url: http://www.cpan.org/authors/id/JPRIT/ + Name: perl-Event License: Artistic License Group: Development/Libraries/Perl Requires: perl = %{perl_version} -Autoreqprov: on +AutoReqProv: on Summary: Event Loop Processing (Perl module) -Version: 1.09 +Version: 1.11 Release: 1 Source: http://www.cpan.org/authors/id/JPRIT/Event-%{version}.tar.bz2 +Source2: %{name}-%{version}-rpmlintrc Patch: Event-1.0-warning.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -67,9 +77,15 @@ /var/adm/perl-modules/%{name} %changelog -* Tue Jul 17 2007 - garloff@suse.de +* Fri Sep 12 2008 garloff@suse.de +- Update to 1.11: + * bugfix in db_show_timeables + * times are now using NV type + * Moved idle2 testcase to demos + * io testcase fixed for Darwin +* Tue Jul 17 2007 garloff@suse.de - Update to 1.09 (no real code changes) -* Wed Apr 25 2007 - ro@suse.de +* Wed Apr 25 2007 ro@suse.de - update to 1.08 * Add casts to quell warnings as suggested by JDHEDDEN@cpan.org. * Marc Lehmann suggests using mg_ptr instead @@ -93,9 +109,9 @@ to be set to undef. * Applied patch to clarify the documentation (with tweaks from Joshua). -* Thu Apr 19 2007 - ro@suse.de +* Fri Apr 20 2007 ro@suse.de - import from 9.2 (needed by iwatch) -* Mon Aug 16 2004 - garloff@suse.de +* Mon Aug 16 2004 garloff@suse.de - Update to Event-1.00: * c/watcher.c: Check for a missing callback. * lib/Event.pm: Make NO_TIME_HIRES actually work. @@ -105,25 +121,25 @@ * Event.xs: Remove U2time. Remove install_time_api(). * Various Event docu updates. * c/watcher.c: Fix SEGV reported by Zefram; add test. -* Sun Jan 11 2004 - adrian@suse.de +* Sun Jan 11 2004 adrian@suse.de - build as user -* Fri Aug 22 2003 - mjancar@suse.cz +* Fri Aug 22 2003 mjancar@suse.cz - require the perl version we build with -* Mon Jul 14 2003 - garloff@suse.de +* Mon Jul 14 2003 garloff@suse.de - Install into %%perl_vendorlib, _vendorarch, use _process_packlist. - Update to Event-0.87: Fix tracevar_r, tracevar_w delcarations. (Fix was in SuSE patch before.) -* Mon May 26 2003 - ro@suse.de +* Mon May 26 2003 ro@suse.de - remove unpackaged files from buildroot -* Wed Aug 28 2002 - prehak@suse.cz +* Wed Aug 28 2002 prehak@suse.cz - disabled make test on ppc64 and s390x -* Fri Aug 09 2002 - mls@suse.de +* Fri Aug 09 2002 mls@suse.de - fixed tracevar_r/w callbacks to work with threaded perl -* Tue Jul 02 2002 - garloff@suse.de +* Tue Jul 02 2002 garloff@suse.de - Update to Event-0.86: * IRIX/Solaris tweaks * Avoid infinite polling loops on some select() implementations -* Thu Jan 17 2002 - garloff@suse.de +* Thu Jan 17 2002 garloff@suse.de - Create package perl-Event (0.83) It's needed by Perl Object Environment (perl-POE). ++++++ Event-1.09.tar.bz2 -> Event-1.11.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/c/ev.c new/Event-1.11/c/ev.c --- old/Event-1.09/c/ev.c 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/c/ev.c 2008-05-17 04:32:03.000000000 +0200 @@ -1,7 +1,7 @@ /* 100 levels will trigger a manditory warning from perl */ #define MAX_CB_NEST 95 -static double QueueTime[PE_QUEUES]; +static NV QueueTime[PE_QUEUES]; static pe_cbframe CBFrame[MAX_CB_NEST]; static int CurCBFrame = -1; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/c/group.c new/Event-1.11/c/group.c --- old/Event-1.09/c/group.c 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/c/group.c 2008-05-17 04:32:03.000000000 +0200 @@ -31,7 +31,7 @@ static char *pe_group_start(pe_watcher *ev, int repeat) { pe_group *gp = (pe_group*) ev; - double timeout; + NV timeout; if (!ev->callback) return "without callback"; @@ -50,9 +50,9 @@ static void pe_group_alarm(pe_watcher *wa, pe_timeable *tm) { STRLEN n_a; pe_group *gp = (pe_group*) wa; - double timeout; - double remaining; - double now = NVtime(); + NV timeout; + NV remaining; + NV now = NVtime(); int xx; for (xx=0; xx < gp->members; xx++) { pe_watcher *mb = gp->member[xx]; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/c/idle.c new/Event-1.11/c/idle.c --- old/Event-1.09/c/idle.c 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/c/idle.c 2008-05-17 04:32:03.000000000 +0200 @@ -25,8 +25,8 @@ } static char *pe_idle_start(pe_watcher *ev, int repeating) { - double now; - double min,max; + NV now; + NV min,max; pe_idle *ip = (pe_idle*) ev; if (!ev->callback) return "without callback"; @@ -50,8 +50,8 @@ } static void pe_idle_alarm(pe_watcher *wa, pe_timeable *_ignore) { - double now = NVtime(); - double min,max,left; + NV now = NVtime(); + NV min,max,left; pe_idle *ip = (pe_idle*) wa; pe_timeable_stop(&ip->tm); if (sv_2interval("min", ip->min_interval, &min)) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/c/io.c new/Event-1.11/c/io.c --- old/Event-1.09/c/io.c 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/c/io.c 2008-05-17 04:32:03.000000000 +0200 @@ -83,8 +83,8 @@ static void pe_io_alarm(pe_watcher *_wa, pe_timeable *hit) { pe_io *wa = (pe_io*) _wa; - double now = NVtime(); - double left = (_wa->cbtime + wa->timeout) - now; + NV now = NVtime(); + NV left = (_wa->cbtime + wa->timeout) - now; if (left < IntervalEpsilon) { pe_ioevent *ev; if (WaREPEAT(wa)) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/c/queue.c new/Event-1.11/c/queue.c --- old/Event-1.09/c/queue.c 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/c/queue.c 2008-05-17 04:32:03.000000000 +0200 @@ -94,7 +94,7 @@ return 0; } -/*inline*/ static void pe_multiplex(double tm) { +/*inline*/ static void pe_multiplex(NV tm) { if (SvIVX(DebugLevel) >= 2) { warn("Event: multiplex %.4fs %s%s\n", tm, PE_RING_EMPTY(&NQueue)?"":"QUEUE", @@ -109,12 +109,12 @@ } } -static double pe_map_prepare(double tm) { +static NV pe_map_prepare(NV tm) { pe_qcallback *qcb = (pe_qcallback*) Prepare.prev->self; while (qcb) { if (qcb->is_perl) { SV *got; - double when; + NV when; dSP; PUSHMARK(SP); PUTBACK; @@ -126,7 +126,7 @@ if (when < tm) tm = when; } else { /* !is_perl */ - double got = (* (double(*)(void*)) qcb->callback)(qcb->ext_data); + NV got = (* (NV(*)(void*)) qcb->callback)(qcb->ext_data); if (got < tm) tm = got; } qcb = (pe_qcallback*) qcb->ring.prev->self; @@ -135,7 +135,7 @@ } static void pe_queue_pending() { - double tm = 0; + NV tm = 0; if (!PE_RING_EMPTY(&Prepare)) tm = pe_map_prepare(tm); pe_multiplex(0); @@ -147,7 +147,7 @@ if (!PE_RING_EMPTY(&AsyncCheck)) pe_map_check(&AsyncCheck); } -static int one_event(double tm) { /**INVOKE**/ +static int one_event(NV tm) { /**INVOKE**/ /*if (SvIVX(DebugLevel) >= 4) warn("Event: ActiveWatchers=%d\n", ActiveWatchers); /**/ @@ -160,7 +160,7 @@ tm = 0; } else { - double t1 = timeTillTimer(); + NV t1 = timeTillTimer(); if (t1 < tm) tm = t1; } if (!PE_RING_EMPTY(&Prepare)) tm = pe_map_prepare(tm); @@ -227,7 +227,7 @@ } } -static int safe_one_event(double maxtm) { +static int safe_one_event(NV maxtm) { int got; pe_check_recovery(); pe_reentry(); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/c/timeable.c new/Event-1.11/c/timeable.c --- old/Event-1.09/c/timeable.c 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/c/timeable.c 2008-05-17 04:32:03.000000000 +0200 @@ -3,29 +3,30 @@ /*#define D_TIMEABLE(x) x /**/ #define D_TIMEABLE(x) /**/ -/* BROQ static void db_show_timeables() { - pe_tmevent *ev; - ev = (pe_tmevent*) Timeables.next->self; - while (ev) { - warn(" %.2f : %s\n", ev->tm.at, SvPV(ev->base.desc, na)); - ev = (pe_tmevent*) ev->tm.ring.next->self; + pe_timeable *tm = (pe_timeable*) Timeables.ring.next; + warn("timeables at %.2f\n", NVtime() + IntervalEpsilon); + while (tm->ring.self) { + STRLEN n_a; + pe_watcher *wa = (pe_watcher*) tm->ring.self; + pe_timeable *next = (pe_timeable*) tm->ring.next; + warn(" %.2f '%s'\n", tm->at, SvPV(wa->desc, n_a)); + tm = next; } } -*/ static void pe_timeables_check() { pe_timeable *tm = (pe_timeable*) Timeables.ring.next; - double now = NVtime() + IntervalEpsilon; - /* warn("timeables at %.2f\n", now); db_show_timeables();/**/ + NV now = NVtime() + IntervalEpsilon; + /*db_show_timeables();/**/ while (tm->ring.self && now >= tm->at) { pe_watcher *ev = (pe_watcher*) tm->ring.self; pe_timeable *next = (pe_timeable*) tm->ring.next; D_TIMEABLE({ if (WaDEBUGx(ev) >= 4) { STRLEN n_a; - warn("Event: timeable expire '%s'\n", SvPV(ev->base.desc, n_a)); + warn("Event: timeable expire '%s'\n", SvPV(ev->desc, n_a)); } }) assert(!WaSUSPEND(ev)); @@ -36,7 +37,7 @@ } } -static double timeTillTimer() { +static NV timeTillTimer() { pe_timeable *tm = (pe_timeable*) Timeables.ring.next; if (!tm->ring.self) return 3600; @@ -50,7 +51,7 @@ assert(!WaSUSPEND(ev)); assert(PE_RING_EMPTY(&tm->ring)); if (WaDEBUGx(ev)) { - double left = tm->at - NVtime(); + NV left = tm->at - NVtime(); if (left < 0) { STRLEN n_a; warn("Event: timer for '%s' set to expire immediately (%.2f)", @@ -65,6 +66,7 @@ /*warn("T:\n"); db_show_timeables();/**/ D_TIMEABLE({ if (WaDEBUGx(ev) >= 4) { + STRLEN n_a; warn("Event: timeable start '%s'\n", SvPV(ev->desc, n_a)); } }) @@ -81,7 +83,7 @@ PE_RING_DETACH(&tm->ring); } -static void pe_timeable_adjust(double delta) { +static void pe_timeable_adjust(NV delta) { pe_timeable *rg = (pe_timeable*) Timeables.ring.next; while (rg != &Timeables) { rg->at += delta; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/c/timer.c new/Event-1.11/c/timer.c --- old/Event-1.09/c/timer.c 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/c/timer.c 2008-05-17 04:32:03.000000000 +0200 @@ -27,7 +27,7 @@ if (repeat) { /* We just finished the callback and need to re-insert at the appropriate time increment. */ - double interval; + NV interval; if (!sv_2interval("timer", tm->interval, &interval)) return "repeating timer has no interval"; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/c/typemap.c new/Event-1.11/c/typemap.c --- old/Event-1.09/c/typemap.c 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/c/typemap.c 2008-05-17 04:32:03.000000000 +0200 @@ -131,9 +131,9 @@ /***************************************************************/ #define VERIFYINTERVAL(name, f) \ - STMT_START { double ign; sv_2interval(name, f, &ign); } STMT_END + STMT_START { NV ign; sv_2interval(name, f, &ign); } STMT_END -int sv_2interval(char *label, SV *in, double *out) { +int sv_2interval(char *label, SV *in, NV *out) { SV *sv = in; if (!sv) return 0; if (SvGMAGICAL(sv)) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/c/unix.c new/Event-1.11/c/unix.c --- old/Event-1.09/c/unix.c 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/c/unix.c 2008-05-17 04:32:03.000000000 +0200 @@ -73,10 +73,10 @@ #if defined(HAS_DEVPOLL) && !PE_SYS_IO #define PE_SYS_IO 1 -static void pe_sys_sleep(double left) { +static void pe_sys_sleep(NV left) { int ret; - double t0 = NVtime(); - double t1 = t0 + left; + NV t0 = NVtime(); + NV t1 = t0 + left; while (1) { ret = poll(0, 0, (int) (left * 1000)); /* hope zeroes okay */ if (ret < 0 && errno != EAGAIN && errno != EINTR) @@ -143,7 +143,7 @@ fdToEvent[ev->fd].ev = NULL; } -static void pe_sys_multiplex(double timeout) { +static void pe_sys_multiplex(NV timeout) { pe_io *ev; int xx, got, mask, fd; int ret; @@ -236,10 +236,10 @@ static int pollMax=0; static int Nfds; -static void pe_sys_sleep(double left) { +static void pe_sys_sleep(NV left) { int ret; - double t0 = NVtime(); - double t1 = t0 + left; + NV t0 = NVtime(); + NV t1 = t0 + left; while (1) { ret = poll(0, 0, (int) (left * 1000)); /* hope zeroes okay */ if (ret < 0 && errno != EAGAIN && errno != EINTR) @@ -256,7 +256,7 @@ static void pe_sys_io_add (pe_io *ev) {} static void pe_sys_io_del (pe_io *ev) {} -static void pe_sys_multiplex(double timeout) { +static void pe_sys_multiplex(NV timeout) { pe_io *ev; int xx; int ret; @@ -352,10 +352,10 @@ static int Nfds; static fd_set Rfds, Wfds, Efds; -static void pe_sys_sleep(double left) { +static void pe_sys_sleep(NV left) { struct timeval tm; - double t0 = NVtime(); - double t1 = t0 + left; + NV t0 = NVtime(); + NV t1 = t0 + left; int ret; while (1) { tm.tv_sec = left; @@ -375,7 +375,7 @@ static void pe_sys_io_add (pe_io *ev) {} static void pe_sys_io_del (pe_io *ev) {} -static void pe_sys_multiplex(double timeout) { +static void pe_sys_multiplex(NV timeout) { struct timeval tm; int ret; fd_set rfds, wfds, efds; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/demo/idle2.t new/Event-1.11/demo/idle2.t --- old/Event-1.09/demo/idle2.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Event-1.11/demo/idle2.t 2008-05-17 04:32:02.000000000 +0200 @@ -0,0 +1,54 @@ +# idle daydreams -*-perl-*- + +# This test is too sensitive to slight variations in timing +# to serve as part of the test suite. + +BEGIN { + eval { + require Time::HiRes; + Time::HiRes->VERSION(1.20); + }; + if ($@) { + print "1..0\n"; + print "ok 1 # skipped; requires Time::HiRes 1.20\n"; + exit; + } +} + +use Test; plan tests => 5; +use Event qw(loop unloop time all_events one_event); + +# $Event::Eval = 1; +# $Event::DebugLevel = 4; +$Event::DIED = \&Event::verbose_exception_handler; + +#----------- complex idle events; fuzzy timers + +my ($cnt,$min,$max,$sum) = (0)x4; +my $prev; +$min = 100; +my $Min = .01; +my $Max = .2; +Event->idle(min => $Min, max => $Max, desc => "*IDLE*TEST*", + cb => sub { + my $now = time; + if (!$prev) { $prev = time; return } + my $d = $now - $prev; + $prev = $now; + $sum += $d; + $min = $d if $d < $min; + $max = $d if $d > $max; + unloop('done') if ++$cnt > 10; + }); +my $sleeps=0; +Event->idle(repeat => 1, cb => sub { Event::sleep $Min; ++$sleeps }); + +Event::sleep .1; # try to let CPU settle +loop(); + +my $epsilon = .05; +ok $sleeps > 1; #did we test anything? +ok $min >= $Min-$epsilon; +ok $max < $Max+$epsilon; # fails without high resolution clock XXX +ok $sum/$cnt >= $min; +ok $sum/$cnt <= $max; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/Event.xs new/Event-1.11/Event.xs --- old/Event-1.09/Event.xs 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/Event.xs 2008-05-17 04:32:03.000000000 +0200 @@ -118,7 +118,7 @@ /* Is time() portable everywhere? Hope so! XXX */ -static double fallback_NVtime() +static NV fallback_NVtime() { return time(0); } #include "Event.h" @@ -150,7 +150,7 @@ /* IntervalEpsilon should be equal to the clock's sleep resolution (poll or select) times two. It probably needs to be bigger if you turn on lots of debugging? Can determine this dynamically? XXX */ -static double IntervalEpsilon = 0.0002; +static NV IntervalEpsilon = 0.0002; static int TimeoutTooEarly=0; static struct EventAPI api; @@ -210,14 +210,14 @@ } #ifdef HAS_GETTIMEOFDAY -double null_loops_per_second(int sec) +NV null_loops_per_second(int sec) { /* This should be more realistic. It is used to normalize the benchmark against some theoretical perfect event loop. */ struct timeval start_tm, done_tm; - double elapse; + NV elapse; unsigned count=0; int fds[2]; if (pipe(fds) != 0) croak("pipe"); @@ -259,7 +259,7 @@ return count/sec; } #else /* !HAS_GETTIMEOFDAY */ -double null_loops_per_second(int sec) +NV null_loops_per_second(int sec) { croak("sorry, gettimeofday is not available"); } #endif @@ -395,10 +395,10 @@ SV **svp = hv_fetch(PL_modglobal, "Time::NVtime", 12, 0); if (!svp || !*svp || !SvIOK(*svp)) XSRETURN_NO; - api.NVtime = INT2PTR(double(*)(), SvIV(*svp)); + api.NVtime = INT2PTR(NV(*)(), SvIV(*svp)); XSRETURN_YES; -double +NV time() PROTOTYPE: CODE: @@ -408,12 +408,12 @@ void sleep(tm) - double tm; + NV tm; PROTOTYPE: $ CODE: pe_sys_sleep(tm); -double +NV null_loops_per_second(sec) int sec @@ -484,7 +484,7 @@ one_event(...) PROTOTYPE: ;$ CODE: - double maxtm = 60; + NV maxtm = 60; if (items == 1) maxtm = SvNV(ST(0)); RETVAL = safe_one_event(maxtm); OUTPUT: @@ -524,7 +524,7 @@ queue_time(prio) int prio PPCODE: - double max=0; + NV max=0; int xx; if (prio < 0 || prio >= PE_QUEUES) croak("queue_time(%d) out of domain [0..%d]", @@ -559,7 +559,8 @@ if (WaDEBUGx(THIS) >= 3) { STRLEN n_a; warn("Event=0x%x '%s' DESTROY SV=0x%x", - THIS, SvPV(THIS->up->desc, n_a), SvRV(THIS->mysv)); + THIS, SvPV(THIS->up->desc, n_a), + THIS->mysv? SvRV(THIS->mysv) : 0); } (*THIS->vtbl->dtor)(THIS); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/lib/Event/EventAPI.h new/Event-1.11/lib/Event/EventAPI.h --- old/Event-1.09/lib/Event/EventAPI.h 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/lib/Event/EventAPI.h 2008-05-17 04:32:03.000000000 +0200 @@ -18,7 +18,7 @@ struct pe_watcher { pe_watcher_vtbl *vtbl; SV *mysv; - double cbtime; /* float? XXX */ + NV cbtime; /* float? XXX */ void *callback; void *ext_data; void *stats; @@ -51,7 +51,7 @@ typedef struct pe_timeable pe_timeable; struct pe_timeable { pe_ring ring; - double at; + NV at; }; typedef struct pe_qcallback pe_qcallback; @@ -162,7 +162,7 @@ typedef struct pe_group pe_group; struct pe_group { pe_watcher base; - double since; + NV since; pe_timeable tm; SV *timeout; int members; @@ -216,7 +216,7 @@ pe_signal *(*new_signal)(HV*, SV*); /* TIMEABLE */ - double (*NVtime)(); + NV (*NVtime)(); void (*tstart)(pe_timeable *); void (*tstop)(pe_timeable *); @@ -234,7 +234,7 @@ void *(*sv_2watcher)(SV *sv); SV *(*event_2sv)(pe_event *ev); void *(*sv_2event)(SV *sv); - int (*sv_2interval)(char *label, SV *in, double *out); + int (*sv_2interval)(char *label, SV *in, NV *out); SV *(*events_mask_2sv)(int mask); int (*sv_2events_mask)(SV *sv, int bits); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/lib/Event.pm new/Event-1.11/lib/Event.pm --- old/Event-1.09/lib/Event.pm 2007-05-22 08:57:47.000000000 +0200 +++ new/Event-1.11/lib/Event.pm 2008-05-17 04:32:03.000000000 +0200 @@ -14,7 +14,7 @@ eval { require Carp::Heavy; }; # work around perl_call_pv bug XXX use vars qw($VERSION @EXPORT_OK $API $DebugLevel $Eval $DIED $Now); -$VERSION = '1.09'; +$VERSION = '1.11'; # If we inherit DynaLoader then we inherit AutoLoader; Bletch! require DynaLoader; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/Makefile.PL new/Event-1.11/Makefile.PL --- old/Event-1.09/Makefile.PL 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/Makefile.PL 2008-05-17 04:32:02.000000000 +0200 @@ -1,6 +1,6 @@ # This -*- perl -*- script makes the Makefile -require 5.005; #most likely +require 5.006_003; # 5.006_002 fails use ExtUtils::MakeMaker; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/MANIFEST new/Event-1.11/MANIFEST --- old/Event-1.09/MANIFEST 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/MANIFEST 2008-05-17 04:32:02.000000000 +0200 @@ -17,6 +17,7 @@ ChangeLog demo/echo.t demo/group.t +demo/idle2.t demo/msg.pm demo/perlqt.t demo/process.pm @@ -60,7 +61,6 @@ t/hook.t t/hup.t t/idle.t -t/idle2.t t/io.t t/leak.t t/leak2.t diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/MANIFEST.SKIP new/Event-1.11/MANIFEST.SKIP --- old/Event-1.09/MANIFEST.SKIP 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/MANIFEST.SKIP 2008-01-15 16:06:55.000000000 +0100 @@ -2,4 +2,4 @@ Makefile(\.old)?$ \.rej$ ^\.i.*$ -^\.git$ +^\.git diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/META.yml new/Event-1.11/META.yml --- old/Event-1.09/META.yml 2007-05-22 09:12:06.000000000 +0200 +++ new/Event-1.11/META.yml 2008-05-17 04:39:55.000000000 +0200 @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Event -version: 1.09 +version: 1.11 version_from: ./lib/Event.pm installdirs: site requires: diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/t/idle2.t new/Event-1.11/t/idle2.t --- old/Event-1.09/t/idle2.t 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/t/idle2.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,51 +0,0 @@ -# idle daydreams -*-perl-*- - -BEGIN { - eval { - require Time::HiRes; - Time::HiRes->VERSION(1.20); - }; - if ($@) { - print "1..0\n"; - print "ok 1 # skipped; requires Time::HiRes 1.20\n"; - exit; - } -} - -use Test; plan tests => 5; -use Event qw(loop unloop time all_events one_event); - -# $Event::Eval = 1; -# $Event::DebugLevel = 4; -$Event::DIED = \&Event::verbose_exception_handler; - -#----------- complex idle events; fuzzy timers - -my ($cnt,$min,$max,$sum) = (0)x4; -my $prev; -$min = 100; -my $Min = .01; -my $Max = .2; -Event->idle(min => $Min, max => $Max, desc => "*IDLE*TEST*", - cb => sub { - my $now = time; - if (!$prev) { $prev = time; return } - my $d = $now - $prev; - $prev = $now; - $sum += $d; - $min = $d if $d < $min; - $max = $d if $d > $max; - unloop('done') if ++$cnt > 10; - }); -my $sleeps=0; -Event->idle(repeat => 1, cb => sub { Event::sleep $Min; ++$sleeps }); - -Event::sleep .1; # try to let CPU settle -loop(); - -my $epsilon = .05; -ok $sleeps > 1; #did we test anything? -ok $min >= $Min-$epsilon; -ok $max < $Max+$epsilon; # fails without high resolution clock XXX -ok $sum/$cnt >= $min; -ok $sum/$cnt <= $max; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Event-1.09/t/io.t new/Event-1.11/t/io.t --- old/Event-1.09/t/io.t 2007-05-22 08:38:35.000000000 +0200 +++ new/Event-1.11/t/io.t 2007-07-27 07:22:36.000000000 +0200 @@ -1,5 +1,6 @@ # -*-perl-*- i/o +use Config; BEGIN { if ($^O eq 'MSWin32') { print "1..0\n"; @@ -84,6 +85,6 @@ loop(); -ok $noticed_bogus_fd, 1; -ok !defined $bogus->fd; +skip $Config{osname} eq 'darwin', $noticed_bogus_fd, 1; +skip $Config{osname} eq 'darwin', !defined $bogus->fd; ok $bogus_timeout > 0; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org