3
3
#include " MemFunEvent.h"
4
4
#include " util.h"
5
5
6
- #include " dds/DCPS/WaitSet.h"
6
+ #include < dds/DCPS/WaitSet.h>
7
7
8
8
namespace Bench {
9
9
@@ -48,7 +48,7 @@ bool ReadAction::init(const ActionConfig& config, ActionReport& report, Builder:
48
48
double period = 1.0 / read_frequency_prop->value .double_prop ();
49
49
int64_t sec = static_cast <int64_t >(period);
50
50
uint64_t usec = static_cast <uint64_t >((period - static_cast <double >(sec)) * 1000000u );
51
- read_period_ = ACE_Time_Value (sec, static_cast <suseconds_t >(usec));
51
+ read_period_ = OpenDDS::DCPS::TimeDuration (sec, static_cast <suseconds_t >(usec));
52
52
}
53
53
54
54
// Then check period as double (seconds)
@@ -57,13 +57,13 @@ bool ReadAction::init(const ActionConfig& config, ActionReport& report, Builder:
57
57
double period = read_period_prop->value .double_prop ();
58
58
int64_t sec = static_cast <int64_t >(period);
59
59
uint64_t usec = static_cast <uint64_t >((period - static_cast <double >(sec)) * 1000000u );
60
- read_period_ = ACE_Time_Value (sec, static_cast <suseconds_t >(usec));
60
+ read_period_ = OpenDDS::DCPS::TimeDuration (sec, static_cast <suseconds_t >(usec));
61
61
}
62
62
63
63
// Finally check period as TimeStamp
64
64
read_period_prop = get_property (config.params , " read_period" , Builder::PVK_TIME);
65
65
if (read_period_prop) {
66
- read_period_ = ACE_Time_Value (read_period_prop->value .time_prop ().sec , static_cast <suseconds_t >(read_period_prop->value .time_prop ().nsec / 1000u ));
66
+ read_period_ = OpenDDS::DCPS::TimeDuration (read_period_prop->value .time_prop ().sec , static_cast <suseconds_t >(read_period_prop->value .time_prop ().nsec / 1000u ));
67
67
}
68
68
69
69
event_ = OpenDDS::DCPS::make_rch<MemFunEvent<ReadAction> >(shared_from_this (), &ReadAction::do_read);
@@ -127,7 +127,7 @@ void ReadAction::do_read()
127
127
bool_guard bg (in_do_read_, cv_);
128
128
if (started_ && !stopped_) {
129
129
DDS::ConditionSeq active;
130
- const DDS::Duration_t duration = { static_cast <CORBA::Long>( read_period_.sec ()), static_cast <CORBA::ULong>(read_period_. usec () * 1000 )} ;
130
+ const DDS::Duration_t duration = read_period_.to_dds_duration () ;
131
131
DDS::WaitSet_var ws_copy= ws_;
132
132
DDS::ReturnCode_t ret;
133
133
0 commit comments