| Index: compiler/lib/clock.dart
|
| diff --git a/compiler/lib/clock.dart b/compiler/lib/clock.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ff75d1d03e0944c91981d7939cb77e91fc0b5ae0
|
| --- /dev/null
|
| +++ b/compiler/lib/clock.dart
|
| @@ -0,0 +1,25 @@
|
| +// Copyright (c) 2011, 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.
|
| +
|
| +/**
|
| + * The class [Clock] provides access to a monotonically incrementing clock
|
| + * device.
|
| + */
|
| +class Clock {
|
| +
|
| + /**
|
| + * Returns the current clock tick.
|
| + */
|
| + static int now() {
|
| + return new Date.now().value;
|
| + }
|
| +
|
| + /**
|
| + * Returns the frequency of clock ticks in Hz.
|
| + */
|
| + static int frequency() {
|
| + return 1000;
|
| + }
|
| +
|
| +}
|
|
|