YARP CiA-402 EtherCAT Device
0.6.0
YARP device plugin for EtherCAT CiA-402 drives
Loading...
Searching...
No Matches
TimeUtils.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Generative Bionics
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#ifndef YARP_DEV_CIA402_TIME_UTILS_H
5
#define YARP_DEV_CIA402_TIME_UTILS_H
6
7
#include <ctime>
8
9
namespace
CiA402
10
{
11
12
inline
std::tm
getLocalTime
(
const
std::time_t
& t)
13
{
14
std::tm
tm{};
15
#ifdef _WIN32
16
localtime_s(&tm, &t);
17
#else
18
localtime_r(&t, &tm);
19
#endif
20
return
tm;
21
}
22
23
}
// namespace CiA402
24
25
#endif
// YARP_DEV_CIA402_TIME_UTILS_H
CiA402
Definition
CiA402StateMachine.h:33
CiA402::getLocalTime
std::tm getLocalTime(const std::time_t &t)
Definition
TimeUtils.h:12
std::time_t
std::tm
src
CiA402
include
CiA402
TimeUtils.h
Generated by
1.13.2