Skip to content

Commit

Permalink
swReactorTimer_now rename to swTimer_now
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Jun 29, 2017
1 parent 448ef9c commit a4ea41c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions include/swoole.h
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,7 @@ int swTimer_init(long msec);
int swTimer_del(swTimer *timer, swTimer_node *node);
void swTimer_free(swTimer *timer);
int swTimer_select(swTimer *timer);
int swTimer_now(struct timeval *time);

static sw_inline swTimer_node* swTimer_get(swTimer *timer, long id)
{
Expand Down
7 changes: 3 additions & 4 deletions src/network/Timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
static int swReactorTimer_init(long msec);
static int swReactorTimer_set(swTimer *timer, long exec_msec);
static swTimer_node* swTimer_add(swTimer *timer, int _msec, int interval, void *data, swTimerCallback callback);
static int swReactorTimer_now(struct timeval *time);

static int swReactorTimer_now(struct timeval *time)
int swTimer_now(struct timeval *time)
{
#if defined(SW_USE_MONOTONIC_TIME) && defined(CLOCK_MONOTONIC)
struct timespec _now;
Expand All @@ -45,7 +44,7 @@ static int swReactorTimer_now(struct timeval *time)
static sw_inline int64_t swTimer_get_relative_msec()
{
struct timeval now;
if (swReactorTimer_now(&now) < 0)
if (swTimer_now(&now) < 0)
{
return SW_ERR;
}
Expand All @@ -62,7 +61,7 @@ int swTimer_init(long msec)
return SW_ERR;
}

if (swReactorTimer_now(&SwooleG.timer.basetime) < 0)
if (swTimer_now(&SwooleG.timer.basetime) < 0)
{
return SW_ERR;
}
Expand Down

0 comments on commit a4ea41c

Please sign in to comment.