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
c0c600ec
Commit
c0c600ec
authored
Sep 11, 2017
by
Sven Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrs-time: duplicate utc offset handling removed
parent
20ba9872
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
19 deletions
+2
-19
wrs-time.c
time-wrs/wrs-time.c
+2
-19
No files found.
time-wrs/wrs-time.c
View file @
c0c600ec
...
@@ -322,25 +322,8 @@ static int wrs_time_set(struct pp_instance *ppi, const struct pp_time *t)
...
@@ -322,25 +322,8 @@ static int wrs_time_set(struct pp_instance *ppi, const struct pp_time *t)
if
(
t
->
secs
<
1420730822
/* "now" as I write this */
)
if
(
t
->
secs
<
1420730822
/* "now" as I write this */
)
return
0
;
return
0
;
/*
/* Finally, set unix time too */
* Finally, set unix time too, but count the UTC/TAI difference
unix_time_ops
.
set
(
ppi
,
t
);
* assuming somebody has set up up for us
*/
memset
(
&
tx
,
0
,
sizeof
(
tx
));
if
(
adjtimex
(
&
tx
)
>=
0
)
{
/*
* Our WRS kernel has tai support, but our compiler does not.
* We are 32-bit only, and we know for sure that tai is
* exactly after stbcnt. It's a bad hack, but it works
*/
tai_offset
=
*
((
int
*
)(
&
tx
.
stbcnt
)
+
1
);
}
{
struct
pp_time
utc
=
*
t
;
/* t is "const". uff.... */
utc
.
secs
-=
tai_offset
;
unix_time_ops
.
set
(
ppi
,
&
utc
);
}
return
0
;
return
0
;
}
}
...
...
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