timestamp.h
Go to the documentation of this file.
1 // Copyright (c) 2021 Pilz GmbH & Co. KG
2 //
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU Lesser General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public License
14 // along with this program. If not, see <https://www.gnu.org/licenses/>.
15 
16 #ifndef PSEN_SCAN_V2_STANDALONE_TIMESTAMP_H
17 #define PSEN_SCAN_V2_STANDALONE_TIMESTAMP_H
18 
19 #include <chrono>
20 
22 {
23 namespace util
24 {
25 inline static auto getCurrentTime()
26 {
27  return std::chrono::time_point_cast<std::chrono::nanoseconds>(std::chrono::system_clock::now())
29  .count();
30 }
31 } // namespace util
32 } // namespace psen_scan_v2_standalone
33 
34 #endif // PSEN_SCAN_V2_STANDALONE_TIMESTAMP_H
static auto getCurrentTime()
Definition: timestamp.h:25
Root namespace in which the software components to communicate with the scanner (firmware-version: 2)...
Definition: udp_client.h:41
double time_since_epoch()


psen_scan_v2
Author(s): Pilz GmbH + Co. KG
autogenerated on Sat Nov 5 2022 02:13:36