blob: cab145f130de197fee502074914055eb85b47c8e [file] [log] [blame]
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <functional>
#include <lib/async-loop/cpp/loop.h>
#include <lib/fit/function.h>
namespace ledger {
// Adds a TraceObserver to start running |runnable| as soon as the tracing is
// enabled; then runs the message loop |loop|.
// If tracing is still not enabled after 5 seconds, posts a quit task.
int RunWithTracing(async::Loop* loop, fit::function<void()> runnable);
} // namespace ledger