Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
47
Issues
47
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
0dec5f19
Commit
0dec5f19
authored
Feb 03, 2020
by
Jean-Claude BAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix servo issue : conversion pp_time to ps
The conversion has been fixed now for negative values.
parent
641f55f9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
time-arith.c
lib/time-arith.c
+15
-3
No files found.
lib/time-arith.c
View file @
0dec5f19
...
...
@@ -95,10 +95,22 @@ void pp_time_div2(struct pp_time *t)
}
int64_t
pp_time_to_picos
(
struct
pp_time
*
t
s
)
int64_t
pp_time_to_picos
(
struct
pp_time
*
t
)
{
return
ts
->
secs
*
PP_PSEC_PER_SEC
+
((
ts
->
scaled_nsecs
*
1000
+
TIME_ROUNDING_VALUE
)
>>
TIME_FRACBITS
);
struct
pp_time
ut
;
int64_t
ret
;
if
(
t
->
secs
<
0
||
(
t
->
secs
==
0
&&
t
->
scaled_nsecs
<
0
)
)
{
ut
.
scaled_nsecs
=-
t
->
scaled_nsecs
;
ut
.
secs
=-
t
->
secs
;
ret
=-
1
;
}
else
{
ret
=
1
;
ut
=*
t
;
}
ret
*=
ut
.
secs
*
PP_PSEC_PER_SEC
+
((
ut
.
scaled_nsecs
*
1000
+
TIME_ROUNDING_VALUE
)
>>
TIME_FRACBITS
);
return
ret
;
}
void
fixedDelta_to_pp_time
(
struct
FixedDelta
fd
,
struct
pp_time
*
t
)
{
...
...
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