Creates an AutoTimer with deduced logger and clock types.

Synopsis

Declared in <folly/logging/AutoTimer.h>

template<
    class Logger = GoogleLogger<GoogleLoggerStyle::PRETTY>,
    class Clock = std::chrono::high_resolution_clock>
auto
makeAutoTimer(
    std::string&& msg = "",
    std::chrono::duration<double> const& minTimeToLog = std::chrono::duration<double>::zero(),
    Logger&& logger = Logger());

Return Value

The constructed AutoTimer.

Parameters

Name

Description

msg

The message to log on destruction; empty disables it.

minTimeToLog

The minimum duration before a message is logged.

logger

The logger used to emit timing messages.

Created with MrDocs