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
50
Issues
50
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
3d49a8c9
Commit
3d49a8c9
authored
Dec 04, 2013
by
Pietro Fezzardi
Committed by
Alessandro Rubini
Mar 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
time-sim: simplified sim_time_get()
parent
bd326eef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
sim-time.c
time-sim/sim-time.c
+2
-7
No files found.
time-sim/sim-time.c
View file @
3d49a8c9
...
...
@@ -44,15 +44,10 @@ int sim_fast_forward_ns(struct pp_globals *ppg, int64_t ff_ns)
static
int
sim_time_get
(
struct
pp_instance
*
ppi
,
TimeInternal
*
t
)
{
struct
timespec
ts
;
ts
.
tv_nsec
=
SIM_PPI_ARCH
(
ppi
)
->
time
.
current_ns
%
t
->
nanoseconds
=
SIM_PPI_ARCH
(
ppi
)
->
time
.
current_ns
%
(
long
long
)
PP_NSEC_PER_SEC
;
t
s
.
tv_sec
=
(
SIM_PPI_ARCH
(
ppi
)
->
time
.
current_ns
-
ts
.
tv_nsec
)
/
t
->
seconds
=
(
SIM_PPI_ARCH
(
ppi
)
->
time
.
current_ns
-
t
->
nanoseconds
)
/
(
long
long
)
PP_NSEC_PER_SEC
;
t
->
nanoseconds
=
ts
.
tv_nsec
;
t
->
seconds
=
ts
.
tv_sec
;
t
->
correct
=
1
;
if
(
!
(
pp_global_flags
&
PP_FLAG_NOTIMELOG
))
...
...
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