Browse Source

optimise ev_now when \!MULTIPLICITY

master
Marc Alexander Lehmann 13 years ago
parent
commit
66dc7ad27c
3 changed files with 3 additions and 2 deletions
  1. +2
    -0
      ev.c
  2. +1
    -1
      ev.h
  3. +0
    -1
      ev_vars.h

+ 2
- 0
ev.c View File

@ -223,6 +223,7 @@ typedef struct
struct ev_loop
{
ev_tstamp ev_rt_now;
#define VAR(name,decl) decl;
#include "ev_vars.h"
#undef VAR
@ -234,6 +235,7 @@ typedef struct
#else
ev_tstamp ev_rt_now;
#define VAR(name,decl) static decl;
#include "ev_vars.h"
#undef VAR


+ 1
- 1
ev.h View File

@ -272,7 +272,7 @@ int ev_default_loop (int methods); /* returns true when successful */
static ev_tstamp
ev_now ()
{
extern ev_rt_now;
extern ev_tstamp ev_rt_now;
return ev_rt_now;
}


+ 0
- 1
ev_vars.h View File

@ -2,7 +2,6 @@
VARx(ev_tstamp, now_floor) /* last time we refreshed rt_time */
VARx(ev_tstamp, mn_now) /* monotonic clock "now" */
VARx(ev_tstamp, ev_rt_now)
VARx(ev_tstamp, rtmn_diff) /* difference realtime - monotonic time */
VARx(int, method)


Loading…
Cancel
Save