[vm] Document clock compatibility between Timeline.now and Dart_TimelineGetMicros.

Change-Id: Ife4b5360b9c42221b9dac84014d072f60cd8f11c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106720
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
Ryan Macnak 2019-06-19 21:17:51 +00:00 committed by commit-bot@chromium.org
parent 1734133f2c
commit 92701dfa48
4 changed files with 9 additions and 3 deletions

View file

@ -301,7 +301,8 @@ DART_EXPORT bool Dart_IsReloading();
/**
* Returns a timestamp in microseconds. This timestamp is suitable for
* passing into the timeline system.
* passing into the timeline system, and uses the same monotonic clock
* as dart:developer's Timeline.now.
*
* \return A timestamp that can be passed to the timeline system.
*/

View file

@ -797,7 +797,8 @@ The _getVMTimeline_ RPC is used to retrieve an object which contains VM timeline
events.
The _timeOriginMicros_ parameter is the beginning of the time range used to filter
timeline events.
timeline events. It uses the same monotonic clock as dart:developer's `Timeline.now`
and the VM embedding API's `Dart_TimelineGetMicros`.
The _timeExtentMicros_ parameter specifies how large the time range used to filter
timeline events should be.

View file

@ -797,7 +797,8 @@ The _getVMTimeline_ RPC is used to retrieve an object which contains VM timeline
events.
The _timeOriginMicros_ parameter is the beginning of the time range used to filter
timeline events.
timeline events. It uses the same monotonic clock as dart:developer's `Timeline.now`
and the VM embedding API's `Dart_TimelineGetMicros`.
The _timeExtentMicros_ parameter specifies how large the time range used to filter
timeline events should be.

View file

@ -166,6 +166,9 @@ class Timeline {
/// The current time stamp from the clock used by the timeline. Units are
/// microseconds.
///
/// When run on the Dart VM, uses the same monotonic clock as the embedding
/// API's `Dart_TimelineGetMicros`.
static int get now => _getTraceClock();
static final List<_SyncBlock> _stack = new List<_SyncBlock>();
}