Index: runtime/include/dart_api.h |
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h |
index e54a52d519adc1bbee5bd6edf539f23ff420e9b9..57d19192401e226ffafe788e670222d335bf1bf9 100644 |
--- a/runtime/include/dart_api.h |
+++ b/runtime/include/dart_api.h |
@@ -954,6 +954,18 @@ DART_EXPORT Dart_Handle Dart_DebugName(); |
*/ |
DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate); |
+/** |
+ * Notifies the VM that the embedder expects to be idle until |deadline|. The VM |
+ * may use this time to perform garbage collection or other tasks to avoid |
+ * delays during execution of Dart code in the future. |
+ * |
+ * |deadline| is measured in microseconds against the system's monotonic time. |
+ * This clock can be accessed via Dart_TimelineGetMicros(). |
+ * |
+ * Requires there to be a current isolate. |
+ */ |
+DART_EXPORT void Dart_NotifyIdle(int64_t deadline); |
+ |
/** |
* Notifies the VM that the current thread should not be profiled until a |
* matching call to Dart_ThreadEnableProfiling is made. |