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
076867aa
Commit
076867aa
authored
Aug 13, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Time function time_DToFloat64 added (refs #110)
parent
f01be55f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
src/lib/co/src/co_time.c
src/lib/co/src/co_time.c
+18
-1
src/lib/co/src/co_time.h
src/lib/co/src/co_time.h
+1
-0
No files found.
src/lib/co/src/co_time.c
View file @
076867aa
...
...
@@ -951,7 +951,7 @@ time_Float64ToD (
}
//! Convert time to
float
.
//! Convert time to
Float32
.
pwr_tFloat32
time_DToFloat
(
...
...
@@ -967,6 +967,23 @@ time_DToFloat (
return
flt
;
}
//! Convert time to Float64.
pwr_tFloat64
time_DToFloat64
(
pwr_tFloat64
*
f
,
pwr_tDeltaTime
*
dt
)
{
static
pwr_tFloat64
flt
;
flt
=
1e-9
*
dt
->
tv_nsec
+
dt
->
tv_sec
;
if
(
f
!=
NULL
)
*
f
=
flt
;
return
flt
;
}
time_tClock
time_DtoClock
(
...
...
src/lib/co/src/co_time.h
View file @
076867aa
...
...
@@ -192,6 +192,7 @@ pwr_tStatus time_SetTime (pwr_tTime*);
pwr_tDeltaTime
*
time_FloatToD
(
pwr_tDeltaTime
*
,
pwr_tFloat32
);
pwr_tDeltaTime
*
time_Float64ToD
(
pwr_tDeltaTime
*
,
pwr_tFloat64
);
pwr_tFloat32
time_DToFloat
(
pwr_tFloat32
*
,
pwr_tDeltaTime
*
);
pwr_tFloat64
time_DToFloat64
(
pwr_tFloat64
*
,
pwr_tDeltaTime
*
);
pwr_tDeltaTime
*
time_Uptime
(
pwr_tStatus
*
,
pwr_tDeltaTime
*
,
pwr_tDeltaTime
*
);
time_tClock
time_Clock
(
pwr_tStatus
*
,
pwr_tDeltaTime
*
);
...
...
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