Changeset View
Changeset View
Standalone View
Standalone View
plugins/process/network/helper/TimeStamps.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * This file is part of KSysGuard. | ||||
3 | * Copyright 2019 Arjen Hiemstra <ahiemstra@heimr.nl> | ||||
4 | * | ||||
5 | * This program is free software; you can redistribute it and/or | ||||
6 | * modify it under the terms of the GNU General Public License as | ||||
7 | * published by the Free Software Foundation; either version 2 of | ||||
8 | * the License or (at your option) version 3 or any later version | ||||
9 | * accepted by the membership of KDE e.V. (or its successor approved | ||||
10 | * by the membership of KDE e.V.), which shall act as a proxy | ||||
11 | * defined in Section 14 of version 3 of the license. | ||||
12 | * | ||||
13 | * This program is distributed in the hope that it will be useful, | ||||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
16 | * GNU General Public License for more details. | ||||
17 | * | ||||
18 | * You should have received a copy of the GNU General Public License | ||||
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
20 | */ | ||||
21 | | ||||
22 | #ifndef TIMESTAMPS_H | ||||
23 | #define TIMESTAMPS_H | ||||
24 | | ||||
25 | #include <chrono> | ||||
26 | | ||||
27 | // This is a helper header to simplify some of the std::chrono usages. | ||||
28 | namespace TimeStamp | ||||
29 | { | ||||
30 | using MicroSeconds = std::chrono::time_point<std::chrono::system_clock, std::chrono::microseconds>; | ||||
31 | using Seconds = std::chrono::time_point<std::chrono::system_clock, std::chrono::seconds>; | ||||
32 | } | ||||
33 | | ||||
34 | #endif |