stopwatch_external_lib.dart 1.01 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// External Library that creates Stopwatches. This file will not be analyzed but
// its symbols will be imported by tests.

class MyStopwatch implements Stopwatch {
  MyStopwatch();
  MyStopwatch.create(): this();

  @override
  Duration get elapsed => throw UnimplementedError();

  @override
  int get elapsedMicroseconds => throw UnimplementedError();

  @override
  int get elapsedMilliseconds => throw UnimplementedError();

  @override
  int get elapsedTicks => throw UnimplementedError();

  @override
  int get frequency => throw UnimplementedError();

  @override
  bool get isRunning => throw UnimplementedError();

  @override
  void reset() { }

  @override
  void start() { }

  @override
  void stop() { }
}

final MyStopwatch stopwatch = MyStopwatch.create();

MyStopwatch createMyStopwatch() => MyStopwatch();
Stopwatch createStopwatch() => Stopwatch();