Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
6b752c9c
Commit
6b752c9c
authored
Mar 08, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix in time_Dadd
parent
9fcd238b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
src/lib/co/src/co_time.c
src/lib/co/src/co_time.c
+14
-3
No files found.
src/lib/co/src/co_time.c
View file @
6b752c9c
...
...
@@ -300,7 +300,7 @@ time_Dadd (
)
{
pwr_tDeltaTime
*
r
=
result
;
int
tv_nsec
;
int
tv_nsec
,
tv_sec
;
assertDelta
(
t
);
assertDelta
(
a
);
...
...
@@ -308,8 +308,19 @@ time_Dadd (
if
(
result
==
NULL
)
r
=
t
;
tv_nsec
=
t
->
tv_nsec
+
a
->
tv_nsec
;
r
->
tv_sec
=
t
->
tv_sec
+
a
->
tv_sec
+
(
tv_nsec
/
1000000000
);
r
->
tv_nsec
=
tv_nsec
%
1000000000
;
tv_sec
=
t
->
tv_sec
+
a
->
tv_sec
+
(
tv_nsec
/
1000000000
);
tv_nsec
=
tv_nsec
%
1000000000
;
if
(
tv_nsec
<
0
&&
tv_sec
>
0
)
{
tv_sec
--
;
tv_nsec
+=
1000000000
;
}
else
if
(
tv_sec
<
0
&&
tv_nsec
>
0
)
{
tv_sec
++
;
tv_nsec
-=
1000000000
;
}
r
->
tv_sec
=
tv_sec
;
r
->
tv_nsec
=
tv_nsec
;
return
r
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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