-void ev_loop (int flags);
-extern int ev_loop_done; /* set to 1 to break out of event loop, set to 2 to break out of all event loops */
+void ev_loop (EV_P_ int flags);
+void ev_unloop (EV_P_ int how); /* set to 1 to break out of event loop, set to 2 to break out of all event loops */
+
+ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */
+
+/*
+ * ref/unref can be used to add or remove a refcount on the mainloop. every watcher
+ * keeps one reference. if you have a long-runing watcher you never unregister that
+ * should not keep ev_loop from running, unref() after starting, and ref() before stopping.
+ */
+void ev_ref (EV_P);
+void ev_unref (EV_P);