Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
PolyORB-HI-C
Commits
8812df0a
Commit
8812df0a
authored
Jan 20, 2016
by
yoogx
Browse files
* Correct handling of overflow on nsec
parent
81545b29
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/po_hi_time.c
View file @
8812df0a
...
...
@@ -5,7 +5,7 @@
*
* For more informations, please visit http://taste.tuxfamily.org/wiki
*
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE.
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE.
*/
#include
<time.h>
...
...
@@ -143,7 +143,7 @@ int __po_hi_add_times (__po_hi_time_t* result, const __po_hi_time_t* left, const
{
result
->
sec
=
left
->
sec
+
right
->
sec
;
result
->
nsec
=
left
->
nsec
+
right
->
nsec
;
if
(
result
->
nsec
>
1000000000
)
while
(
result
->
nsec
>
1000000000
)
{
result
->
sec
=
result
->
sec
+
1
;
result
->
nsec
=
result
->
nsec
-
1000000000
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment