mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 08:51:21 +00:00
[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:
parent
1734133f2c
commit
92701dfa48
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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>();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue