]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Event: remove next_time which isn't needed
authorHaomai Wang <haomai@xsky.com>
Tue, 24 May 2016 08:24:12 +0000 (16:24 +0800)
committerHaomai Wang <haomai@xsky.com>
Wed, 29 Jun 2016 04:14:04 +0000 (12:14 +0800)
Signed-off-by: Haomai Wang <haomai@xsky.com>
src/msg/async/Event.cc
src/msg/async/Event.h

index e6d7fcdebd69760b8bdd72e4290b5188f0daf0a6..9549c3ebc4f93ae5dcb89965303786d41b280a13 100644 (file)
@@ -231,8 +231,6 @@ uint64_t EventCenter::create_time_event(uint64_t microseconds, EventCallbackRef
   event.id = id;
   event.time_cb = ctxt;
   time_events[expire] = event;
-  if (expire < next_time)
-    wakeup();
 
   return id;
 }
@@ -301,7 +299,6 @@ int EventCenter::process_events(int timeout_microseconds)
   if (external_num_events.load()) {
     tv.tv_sec = 0;
     tv.tv_usec = 0;
-    next_time = now;
   } else {
     clock_type::time_point shortest;
     shortest = now + std::chrono::microseconds(timeout_microseconds); 
@@ -321,7 +318,6 @@ int EventCenter::process_events(int timeout_microseconds)
     }
     tv.tv_sec = timeout_microseconds / 1000000;
     tv.tv_usec = timeout_microseconds % 1000000;
-    next_time = shortest;
   }
 
   ldout(cct, 10) << __func__ << " wait second " << tv.tv_sec << " usec " << tv.tv_usec << dendl;
index d51b6bc13e7fad329d11687cdb9f8d15063b8b24..09a9b781c945f597f84ceed4af4b32c2fa4ccc79 100644 (file)
@@ -115,7 +115,6 @@ class EventCenter {
   EventDriver *driver;
   multimap<clock_type::time_point, TimeEvent> time_events;
   uint64_t time_event_next_id;
-  clock_type::time_point next_time; // next wake up time
   int notify_receive_fd;
   int notify_send_fd;
   NetHandler net;