mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 14:32:49 +00:00
c99df050b1
Rename OS::GetCurrentTraceMicros() to OS::GetCurrentMonotonicMicros(). BUG=http://dartbug.com/477 BUG=http://dartbug.com/12383 R=iposva@google.com Review URL: https://codereview.chromium.org/1504523002 .
24 lines
671 B
C++
24 lines
671 B
C++
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "vm/bootstrap_natives.h"
|
|
|
|
#include "vm/object.h"
|
|
#include "vm/os.h"
|
|
|
|
namespace dart {
|
|
|
|
DEFINE_NATIVE_ENTRY(Stopwatch_now, 0) {
|
|
// TODO(iposva): investigate other hi-res time sources such as cycle count.
|
|
return Integer::New(OS::GetCurrentMonotonicMicros());
|
|
}
|
|
|
|
|
|
DEFINE_NATIVE_ENTRY(Stopwatch_frequency, 0) {
|
|
// TODO(iposva): investigate other hi-res time sources such as cycle count.
|
|
return Integer::New(1000000);
|
|
}
|
|
|
|
} // namespace dart
|