Lines 20-27
Link Here
|
20 |
inline void to_time(int milliseconds, boost::xtime& xt) |
20 |
inline void to_time(int milliseconds, boost::xtime& xt) |
21 |
{ |
21 |
{ |
22 |
int res = 0; |
22 |
int res = 0; |
23 |
res = boost::xtime_get(&xt, boost::TIME_UTC); |
23 |
res = boost::xtime_get(&xt, TIME_UTC); |
24 |
BOOST_ASSERT(res == boost::TIME_UTC); (void)res; |
24 |
BOOST_ASSERT(res == TIME_UTC); |
25 |
|
25 |
|
26 |
xt.sec += (milliseconds / MILLISECONDS_PER_SECOND); |
26 |
xt.sec += (milliseconds / MILLISECONDS_PER_SECOND); |
27 |
xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) * |
27 |
xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) * |
Lines 56-63
Link Here
|
56 |
{ |
56 |
{ |
57 |
boost::xtime cur; |
57 |
boost::xtime cur; |
58 |
int res = 0; |
58 |
int res = 0; |
59 |
res = boost::xtime_get(&cur, boost::TIME_UTC); |
59 |
res = boost::xtime_get(&cur, TIME_UTC); |
60 |
BOOST_ASSERT(res == boost::TIME_UTC); (void)res; |
60 |
BOOST_ASSERT(res == TIME_UTC); |
61 |
|
61 |
|
62 |
if (boost::xtime_cmp(xt, cur) <= 0) |
62 |
if (boost::xtime_cmp(xt, cur) <= 0) |
63 |
{ |
63 |
{ |
Lines 87-94
Link Here
|
87 |
{ |
87 |
{ |
88 |
boost::xtime cur; |
88 |
boost::xtime cur; |
89 |
int res = 0; |
89 |
int res = 0; |
90 |
res = boost::xtime_get(&cur, boost::TIME_UTC); |
90 |
res = boost::xtime_get(&cur, TIME_UTC); |
91 |
BOOST_ASSERT(res == boost::TIME_UTC); (void)res; |
91 |
BOOST_ASSERT(res == TIME_UTC); |
92 |
|
92 |
|
93 |
if (boost::xtime_cmp(xt, cur) <= 0) |
93 |
if (boost::xtime_cmp(xt, cur) <= 0) |
94 |
milliseconds = 0; |
94 |
milliseconds = 0; |
Lines 109-116
Link Here
|
109 |
{ |
109 |
{ |
110 |
boost::xtime cur; |
110 |
boost::xtime cur; |
111 |
int res = 0; |
111 |
int res = 0; |
112 |
res = boost::xtime_get(&cur, boost::TIME_UTC); |
112 |
res = boost::xtime_get(&cur, TIME_UTC); |
113 |
BOOST_ASSERT(res == boost::TIME_UTC); (void)res; |
113 |
BOOST_ASSERT(res == TIME_UTC); |
114 |
|
114 |
|
115 |
if (boost::xtime_cmp(xt, cur) <= 0) |
115 |
if (boost::xtime_cmp(xt, cur) <= 0) |
116 |
microseconds = 0; |
116 |
microseconds = 0; |