| 1 | // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
|---|---|
| 2 | // for details. All rights reserved. Use of this source code is governed by a |
| 3 | // BSD-style license that can be found in the LICENSE file. |
| 4 | |
| 5 | #include "vm/timer.h" |
| 6 | #include "platform/globals.h" |
| 7 | #include "vm/json_stream.h" |
| 8 | #include "vm/thread.h" |
| 9 | |
| 10 | namespace dart { |
| 11 | |
| 12 | PrintTimeScope::~PrintTimeScope() { |
| 13 | timer_.Stop(); |
| 14 | OS::PrintErr(format: "%s %s\n", name_, |
| 15 | timer_.FormatElapsedHumanReadable(zone: Thread::Current()->zone())); |
| 16 | } |
| 17 | |
| 18 | } // namespace dart |
| 19 |
