Skip to content

Commit 53ee7c0

Browse files
Merge pull request #1863 from ApexAI/iox-1391-move-time-classes-to-time-module
iox-1391 Move time-related classes to `Time` module
2 parents e832ccb + a264a65 commit 53ee7c0

File tree

46 files changed

+158
-95
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+158
-95
lines changed

.clang-tidy-diff-scans.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
./iceoryx_hoofs/test/moduletests/test_polymorphic_handler.cpp
4646
./iceoryx_hoofs/test/moduletests/test_static_lifetime_guard.cpp
4747

48+
./iceoryx_hoofs/posix/**/*
49+
4850
./iceoryx_hoofs/container/include/iox/**/*
4951
./iceoryx_hoofs/test/moduletests/test_container_*
5052

@@ -53,6 +55,14 @@
5355

5456
./iceoryx_hoofs/design/**/*
5557
./iceoryx_hoofs/test/moduletests/test_design_*
58+
./iceoryx_hoofs/utility/**/*
59+
./iceoryx_hoofs/test/moduletests/test_utility_*
60+
61+
./iceoryx_hoofs/primitives/**/*
62+
./iceoryx_hoofs/test/moduletests/test_primitives_*
63+
64+
./iceoryx_hoofs/time/**/*
65+
./iceoryx_hoofs/test/moduletests/test_time_*
5666

5767
# IMPORTANT:
5868
# after the first # everything is considered a comment, add new files and

doc/website/release-notes/iceoryx-unreleased.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,3 +998,25 @@
998998
// iox::string to std::string
999999
std::string myConvertedIoxString = iox::into<std::string>(myIoxString);
10001000
```
1001+
1002+
44. Move and rename `DeadlineTimer`
1003+
1004+
```cpp
1005+
// before
1006+
#include "iceoryx_hoofs/cxx/deadline_timer.hpp"
1007+
iox::cxx::DeadlineTimer myTimer;
1008+
1009+
// after
1010+
#include "iox/deadline_timer.hpp"
1011+
iox::deadline_timer myTimer;
1012+
```
1013+
1014+
45. Changed include path of `iox::units::Duration`
1015+
1016+
```cpp
1017+
// before
1018+
#include "iceoryx_hoofs/internal/units/duration.hpp"
1019+
1020+
// after
1021+
#include "iox/duration.hpp"
1022+
```

iceoryx_dust/include/iceoryx_dust/posix_wrapper/message_queue.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919

2020
#include "iceoryx_dust/design/creation.hpp"
2121
#include "iceoryx_hoofs/internal/posix_wrapper/ipc_channel.hpp"
22-
#include "iceoryx_hoofs/internal/units/duration.hpp"
2322
#include "iceoryx_platform/fcntl.hpp"
2423
#include "iceoryx_platform/mqueue.hpp"
2524
#include "iceoryx_platform/stat.hpp"
25+
#include "iox/duration.hpp"
2626
#include "iox/optional.hpp"
2727

2828
namespace iox

iceoryx_dust/include/iceoryx_dust/posix_wrapper/named_pipe.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
#include "iceoryx_hoofs/concurrent/lockfree_queue.hpp"
2121
#include "iceoryx_hoofs/internal/posix_wrapper/ipc_channel.hpp"
2222
#include "iceoryx_hoofs/internal/posix_wrapper/shared_memory_object.hpp"
23-
#include "iceoryx_hoofs/internal/units/duration.hpp"
2423
#include "iceoryx_hoofs/posix_wrapper/unnamed_semaphore.hpp"
2524
#include "iceoryx_platform/semaphore.hpp"
25+
#include "iox/duration.hpp"
2626
#include "iox/expected.hpp"
2727
#include "iox/optional.hpp"
2828
#include "iox/string.hpp"

iceoryx_dust/source/posix_wrapper/named_pipe.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "iceoryx_dust/posix_wrapper/named_pipe.hpp"
1818
#include "iceoryx_dust/cxx/std_string_support.hpp"
19-
#include "iceoryx_hoofs/cxx/deadline_timer.hpp"
19+
#include "iox/deadline_timer.hpp"
2020
#include "iox/into.hpp"
2121

2222
#include <thread>
@@ -389,7 +389,7 @@ bool NamedPipe::NamedPipeData::waitForInitialization() const noexcept
389389
return true;
390390
}
391391

392-
cxx::DeadlineTimer deadlineTimer(WAIT_FOR_INIT_TIMEOUT);
392+
deadline_timer deadlineTimer(WAIT_FOR_INIT_TIMEOUT);
393393

394394
while (!deadlineTimer.hasExpired())
395395
{

iceoryx_examples/iceperf/base.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "example_common.hpp"
2121
#include "topic_data.hpp"
2222

23-
#include "iceoryx_hoofs/internal/units/duration.hpp"
23+
#include "iox/duration.hpp"
2424

2525
#include <chrono>
2626
#include <iostream>

iceoryx_examples/iceperf/mq.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
#include "base.hpp"
2121

2222
#include "iceoryx_hoofs/internal/posix_wrapper/ipc_channel.hpp"
23-
#include "iceoryx_hoofs/internal/units/duration.hpp"
2423
#include "iceoryx_platform/fcntl.hpp"
2524
#include "iceoryx_platform/mqueue.hpp"
2625
#include "iceoryx_platform/stat.hpp"
26+
#include "iox/duration.hpp"
2727
#include "iox/optional.hpp"
2828

2929
#include <string>

iceoryx_hoofs/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ cc_library(
3535
"source/**/*.hpp",
3636
"memory/source/*.cpp",
3737
"design/source/*.cpp",
38+
"posix/time/source/*.cpp",
3839
]),
39-
hdrs = glob(["include/**"]) + glob(["legacy/**"]) + glob(["memory/**"]) + glob(["container/**"]) + glob(["vocabulary/**"]) + glob(["utility/**"]) + glob(["primitives/**"]) + glob(["design/**"]) + [
40+
hdrs = glob(["include/**"]) + glob(["legacy/**"]) + glob(["memory/**"]) + glob(["container/**"]) + glob(["vocabulary/**"]) + glob(["time/**"]) + glob(["utility/**"]) + glob(["primitives/**"]) + glob(["posix/**"]) + glob(["design/**"]) + [
4041
":iceoryx_hoofs_deployment_hpp",
4142
],
4243
includes = [
@@ -45,7 +46,9 @@ cc_library(
4546
"include/",
4647
"legacy/include/",
4748
"memory/include/",
49+
"posix/time/include/",
4850
"primitives/include/",
51+
"time/include/",
4952
"utility/include/",
5053
"vocabulary/include/",
5154
],

iceoryx_hoofs/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ iox_add_library(
5454
${PROJECT_SOURCE_DIR}/utility/include
5555
${PROJECT_SOURCE_DIR}/primitives/include
5656
${PROJECT_SOURCE_DIR}/design/include
57+
${PROJECT_SOURCE_DIR}/time/include
58+
${PROJECT_SOURCE_DIR}/posix/time/include
5759
${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include
5860
INSTALL_INTERFACE include/${PREFIX}
5961
EXPORT_INCLUDE_DIRS include/
@@ -64,10 +66,12 @@ iox_add_library(
6466
utility/include/
6567
primitives/include/
6668
design/include/
69+
time/include/
70+
posix/time/include/
6771
FILES
6872
source/concurrent/loffli.cpp
69-
source/cxx/adaptive_wait.cpp
70-
source/cxx/deadline_timer.cpp
73+
posix/time/source/adaptive_wait.cpp
74+
posix/time/source/deadline_timer.cpp
7175
source/cxx/filesystem.cpp
7276
source/cxx/requires.cpp
7377
source/cxx/type_traits.cpp

iceoryx_hoofs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ setTimeout(5_ms); // 5 milliseconds
169169
| class | internal | description |
170170
|:-------------------:|:--------:|:--------------------------------------------------------------------------------------------------------------------------------------------|
171171
|`Duration` | i | Represents the unit time, is convertible to `timespec` and `timeval`. User defined literals are available for convenience and readability. |
172-
|`DeadlineTimer` | | Polling based timer to check for an elapsed deadline. |
172+
|`deadline_timer | | Polling based timer to check for an elapsed deadline. |
173173
|`adaptive_wait` | i | Building block to realize busy waiting loops with low CPU load. |
174174
175175
<center>

0 commit comments

Comments
 (0)