ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev++.h
(Generate patch)

Comparing libev/ev++.h (file contents):
Revision 1.44 by root, Wed Dec 3 15:23:44 2008 UTC vs.
Revision 1.47 by root, Sat Dec 26 09:21:54 2009 UTC

205#else 205#else
206 ev_default_fork (); 206 ev_default_fork ();
207#endif 207#endif
208 } 208 }
209 209
210 unsigned int backend () const throw ()
211 {
212 return ev_backend (EV_AX);
213 }
214
215 tstamp now () const throw ()
216 {
217 return ev_now (EV_AX);
218 }
219
220 void ref () throw ()
221 {
222 ev_ref (EV_AX);
223 }
224
225 void unref () throw ()
226 {
227 ev_unref (EV_AX);
228 }
229
230#if EV_MINIMAL < 2
210 unsigned int count () const throw () 231 unsigned int count () const throw ()
211 { 232 {
212 return ev_loop_count (EV_AX); 233 return ev_loop_count (EV_AX);
213 } 234 }
214 235
215 unsigned int backend () const throw () 236 unsigned int depth () const throw ()
216 {
217 return ev_backend (EV_AX);
218 } 237 {
219
220 tstamp now () const throw ()
221 {
222 return ev_now (EV_AX); 238 return ev_loop_depth (EV_AX);
223 }
224
225 void ref () throw ()
226 {
227 ev_ref (EV_AX);
228 }
229
230 void unref () throw ()
231 {
232 ev_unref (EV_AX);
233 } 239 }
234 240
235 void set_io_collect_interval (tstamp interval) throw () 241 void set_io_collect_interval (tstamp interval) throw ()
236 { 242 {
237 ev_set_io_collect_interval (EV_AX_ interval); 243 ev_set_io_collect_interval (EV_AX_ interval);
239 245
240 void set_timeout_collect_interval (tstamp interval) throw () 246 void set_timeout_collect_interval (tstamp interval) throw ()
241 { 247 {
242 ev_set_timeout_collect_interval (EV_AX_ interval); 248 ev_set_timeout_collect_interval (EV_AX_ interval);
243 } 249 }
250#endif
244 251
245 // function callback 252 // function callback
246 void once (int fd, int events, tstamp timeout, void (*cb)(int, void *), void *arg = 0) throw () 253 void once (int fd, int events, tstamp timeout, void (*cb)(int, void *), void *arg = 0) throw ()
247 { 254 {
248 ev_once (EV_AX_ fd, events, timeout, cb, arg); 255 ev_once (EV_AX_ fd, events, timeout, cb, arg);
635 642
636 void again () throw () 643 void again () throw ()
637 { 644 {
638 ev_timer_again (EV_A_ static_cast<ev_timer *>(this)); 645 ev_timer_again (EV_A_ static_cast<ev_timer *>(this));
639 } 646 }
647
648 ev_tstamp remaining ()
649 {
650 return ev_timer_remaining (EV_A_ static_cast<ev_timer *>(this));
651 }
640 EV_END_WATCHER (timer, timer) 652 EV_END_WATCHER (timer, timer)
641 653
642 #if EV_PERIODIC_ENABLE 654 #if EV_PERIODIC_ENABLE
643 EV_BEGIN_WATCHER (periodic, periodic) 655 EV_BEGIN_WATCHER (periodic, periodic)
644 void set (ev_tstamp at, ev_tstamp interval = 0.) throw () 656 void set (ev_tstamp at, ev_tstamp interval = 0.) throw ()
716 ev_stat_stat (EV_A_ static_cast<ev_stat *>(this)); 728 ev_stat_stat (EV_A_ static_cast<ev_stat *>(this));
717 } 729 }
718 EV_END_WATCHER (stat, stat) 730 EV_END_WATCHER (stat, stat)
719 #endif 731 #endif
720 732
733#if EV_IDLE_ENABLE
721 EV_BEGIN_WATCHER (idle, idle) 734 EV_BEGIN_WATCHER (idle, idle)
722 void set () throw () { } 735 void set () throw () { }
723 EV_END_WATCHER (idle, idle) 736 EV_END_WATCHER (idle, idle)
737#endif
724 738
725 EV_BEGIN_WATCHER (prepare, prepare) 739 EV_BEGIN_WATCHER (prepare, prepare)
726 void set () throw () { } 740 void set () throw () { }
727 EV_END_WATCHER (prepare, prepare) 741 EV_END_WATCHER (prepare, prepare)
728 742

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines