Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1406)

Unified Diff: src/vm/event_handler.h

Issue 1375373004: Use the event-handler for timers. (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/vm/event_handler.h
diff --git a/src/vm/event_handler.h b/src/vm/event_handler.h
index 375b1c15703454a89512d1f66dea33c1327b1090..422f00d2f63ddb75297aec7217139f19a34821e3 100644
--- a/src/vm/event_handler.h
+++ b/src/vm/event_handler.h
@@ -6,6 +6,7 @@
#define SRC_VM_EVENT_HANDLER_H_
#include "src/shared/globals.h"
+#include "src/vm/hash_map.h"
#include "src/vm/thread.h"
namespace fletch {
@@ -26,6 +27,7 @@ class EventHandler {
~EventHandler();
int GetEventHandler();
+ void ScheduleTimeout(int64 timeout, Port* port);
Monitor* monitor() const { return monitor_; }
@@ -37,6 +39,9 @@ class EventHandler {
int fd_;
ThreadIdentifier thread_;
+ HashMap<Port*, int64> timeouts_;
+ int64 next_timeout_;
+
int read_fd_;
int write_fd_;

Powered by Google App Engine
This is Rietveld 408576698