Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
format_time.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Roc authors
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
8
9//! @file roc_core/target_posix/roc_core/format_time.h
10//! @brief Retrieve and format current time.
11
12#ifndef ROC_CORE_FORMAT_TIME_H_
13#define ROC_CORE_FORMAT_TIME_H_
14
15#include "roc_core/stddefs.h"
16
17namespace roc {
18namespace core {
19
20//! Retrieve and format current time.
21//
22//! @remarks
23//! The time is printed in the format "13:10:05.123".
24//!
25//! @returns
26//! false if an error occured or buffer is too small.
27//!
28//! @note
29//! This function should not log anything because it is used
30//! in the logger implementation.
31bool format_time(char* buf, size_t bufsz);
32
33} // namespace core
34} // namespace roc
35
36#endif // ROC_CORE_FORMAT_TIME_H_
bool format_time(char *buf, size_t bufsz)
Retrieve and format current time.
Root namespace.
Commonly used types and functions.