Time.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
5
#include <
ArmarXCore/core/time/DateTime.h
>
6
#include <
ArmarXCore/core/time/Duration.h
>
7
8
#include "
forward_declarations.h
"
9
10
11
namespace
armarx::armem
12
{
13
14
/**
15
* @brief Returns `time` as e.g. "123456789.012 ms".
16
* @param decimals How many sub-millisecond decimals to include.
17
*/
18
std::string
toStringMilliSeconds
(
const
Time
& time,
int
decimals = 3);
19
20
/**
21
* @brief Returns `time` as e.g. "123456789012 `mu`s".
22
* The output string contains the actual greek letter `mu`.
23
*/
24
std::string
toStringMicroSeconds
(
const
Time
& time);
25
26
/**
27
* @brief Returns `time`as e.g. "2020-11-16 17:01:54.123456".
28
* @param decimals How many sub-second decimals to include.
29
*/
30
std::string
toDateTimeMilliSeconds
(
const
Time
& time,
int
decimals = 6);
31
32
33
/**
34
* @brief Get a `Time` from the microseconds as text.
35
*/
36
Time
timeFromStringMicroSeconds
(
const
std::string& microSeconds);
37
38
}
// namespace armarx::armem
DateTime.h
forward_declarations.h
armarx::armem::timeFromStringMicroSeconds
Time timeFromStringMicroSeconds(const std::string µSeconds)
Get a Time from the microseconds as text.
Definition:
Time.cpp:50
armarx::armem
Definition:
LegacyRobotStateMemoryAdapter.cpp:31
Duration.h
armarx::armem::toDateTimeMilliSeconds
std::string toDateTimeMilliSeconds(const Time &time, int decimals=6)
Returns timeas e.g.
Definition:
Time.cpp:35
armarx::armem::toStringMilliSeconds
std::string toStringMilliSeconds(const Time &time, int decimals=3)
Returns time as e.g.
Definition:
Time.cpp:11
armarx::armem::toStringMicroSeconds
std::string toStringMicroSeconds(const Time &time)
Returns time as e.g.
Definition:
Time.cpp:26
armarx::armem::Time
armarx::core::time::DateTime Time
Definition:
forward_declarations.h:13
RobotAPI
libraries
armem
core
Time.h
Generated on Sat Oct 12 2024 09:14:07 for armarx_documentation by
1.8.17