summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ev.37
-rw-r--r--ev.c8
-rw-r--r--ev.h4
-rw-r--r--ev.html8
-rw-r--r--ev.pod6
5 files changed, 19 insertions, 14 deletions
diff --git a/ev.3 b/ev.3
index 963bdfd..1fdfe55 100644
--- a/ev.3
+++ b/ev.3
@@ -261,14 +261,17 @@ you actually want to know.
.IP "int ev_version_minor ()" 4
.IX Item "int ev_version_minor ()"
.PD
-You can find out the major and minor version numbers of the library
+You can find out the major and minor \s-1API/ABI\s0 version numbers of the library
you linked against by calling the functions \f(CW\*(C`ev_version_major\*(C'\fR and
\&\f(CW\*(C`ev_version_minor\*(C'\fR. If you want, you can compare against the global
symbols \f(CW\*(C`EV_VERSION_MAJOR\*(C'\fR and \f(CW\*(C`EV_VERSION_MINOR\*(C'\fR, which specify the
version of the library your program was compiled against.
.Sp
+These version numbers refer to the \s-1API\s0 and \s-1ABI\s0 version of the library, not
+the release version.
+.Sp
Usually, it's a good idea to terminate if the major versions mismatch,
-as this indicates an incompatible change. Minor versions are usually
+as this indicates an incompatible change. Minor versions are usually
compatible to older versions, so a larger minor version alone is usually
not a problem.
.Sp
diff --git a/ev.c b/ev.c
index 823b68c..3fc528a 100644
--- a/ev.c
+++ b/ev.c
@@ -1239,7 +1239,7 @@ periodics_reify (EV_P)
}
else if (w->interval)
{
- ((WT)w)->at += floor ((ev_rt_now - ((WT)w)->at) / w->interval + 1.) * w->interval;
+ ((WT)w)->at = w->offset + floor ((ev_rt_now - w->offset) / w->interval + 1.) * w->interval;
assert (("ev_periodic timeout in the past detected while processing timers, negative interval?", ((WT)w)->at > ev_rt_now));
downheap ((WT *)periodics, periodiccnt, 0);
}
@@ -1263,7 +1263,7 @@ periodics_reschedule (EV_P)
if (w->reschedule_cb)
((WT)w)->at = w->reschedule_cb (w, ev_rt_now);
else if (w->interval)
- ((WT)w)->at += ceil ((ev_rt_now - ((WT)w)->at) / w->interval) * w->interval;
+ ((WT)w)->at = w->offset + ceil ((ev_rt_now - w->offset) / w->interval) * w->interval;
}
/* now rebuild the heap */
@@ -1692,8 +1692,10 @@ ev_periodic_start (EV_P_ ev_periodic *w)
{
assert (("ev_periodic_start called with negative interval value", w->interval >= 0.));
/* this formula differs from the one in periodic_reify because we do not always round up */
- ((WT)w)->at += ceil ((ev_rt_now - ((WT)w)->at) / w->interval) * w->interval;
+ ((WT)w)->at = w->offset + ceil ((ev_rt_now - w->offset) / w->interval) * w->interval;
}
+ else
+ ((WT)w)->at = w->offset;
ev_start (EV_A_ (W)w, ++periodiccnt);
array_needsize (ev_periodic *, periodics, periodicmax, periodiccnt, EMPTY2);
diff --git a/ev.h b/ev.h
index fa4c6c7..c4b843e 100644
--- a/ev.h
+++ b/ev.h
@@ -119,8 +119,8 @@ struct ev_loop;
# define EV_PROTOTYPES 1
#endif
-#define EV_VERSION_MAJOR 1
-#define EV_VERSION_MINOR 1
+#define EV_VERSION_MAJOR 2
+#define EV_VERSION_MINOR 0
#ifndef EV_CB_DECLARE
# define EV_CB_DECLARE(type) void (*cb)(EV_P_ struct type *w, int revents);
diff --git a/ev.html b/ev.html
index e1af75a..f63538f 100644
--- a/ev.html
+++ b/ev.html
@@ -6,7 +6,7 @@
<meta name="description" content="Pod documentation for libev" />
<meta name="inputfile" content="&lt;standard input&gt;" />
<meta name="outputfile" content="&lt;standard output&gt;" />
- <meta name="created" content="Sun Dec 9 20:45:16 2007" />
+ <meta name="created" content="Sun Dec 9 20:47:27 2007" />
<meta name="generator" content="Pod::Xhtml 1.57" />
<link rel="stylesheet" href="http://res.tst.eu/pod.css"/></head>
<body>
@@ -187,13 +187,13 @@ you actually want to know.</p>
<dt>int ev_version_major ()</dt>
<dt>int ev_version_minor ()</dt>
<dd>
- <p>You can find out the major and minor API/ABI version numbers of the library
+ <p>You can find out the major and minor ABI version numbers of the library
you linked against by calling the functions <code>ev_version_major</code> and
<code>ev_version_minor</code>. If you want, you can compare against the global
symbols <code>EV_VERSION_MAJOR</code> and <code>EV_VERSION_MINOR</code>, which specify the
version of the library your program was compiled against.</p>
- <p>These version numbers refer to the API and ABI version of the library, not
-the release version.</p>
+ <p>These version numbers refer to the ABI version of the library, not the
+release version.</p>
<p>Usually, it's a good idea to terminate if the major versions mismatch,
as this indicates an incompatible change. Minor versions are usually
compatible to older versions, so a larger minor version alone is usually
diff --git a/ev.pod b/ev.pod
index 0657b7f..063c01d 100644
--- a/ev.pod
+++ b/ev.pod
@@ -119,14 +119,14 @@ you actually want to know.
=item int ev_version_minor ()
-You can find out the major and minor API/ABI version numbers of the library
+You can find out the major and minor ABI version numbers of the library
you linked against by calling the functions C<ev_version_major> and
C<ev_version_minor>. If you want, you can compare against the global
symbols C<EV_VERSION_MAJOR> and C<EV_VERSION_MINOR>, which specify the
version of the library your program was compiled against.
-These version numbers refer to the API and ABI version of the library, not
-the release version.
+These version numbers refer to the ABI version of the library, not the
+release version.
Usually, it's a good idea to terminate if the major versions mismatch,
as this indicates an incompatible change. Minor versions are usually