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
024fbbdd
Commit
024fbbdd
authored
Sep 18, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function time_Float64ToD added
parent
64680351
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
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
+2
-1
No files found.
src/lib/co/src/co_time.c
View file @
024fbbdd
/**
* Proview $Id: co_time.c,v 1.1
1 2006-12-10 14:33:34 lw
Exp $
* Proview $Id: co_time.c,v 1.1
2 2008-09-18 15:08:19 claes
Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -905,6 +905,23 @@ time_FloatToD (
return
t
;
}
pwr_tDeltaTime
*
time_Float64ToD
(
pwr_tDeltaTime
*
dt
,
pwr_tFloat64
f
)
{
static
pwr_tDeltaTime
time
;
static
pwr_tDeltaTime
*
t
=
&
time
;
if
(
dt
!=
NULL
)
t
=
dt
;
t
->
tv_sec
=
f
;
t
->
tv_nsec
=
(
f
-
t
->
tv_sec
)
*
1e9
;
return
t
;
}
//! Convert time to float.
...
...
src/lib/co/src/co_time.h
View file @
024fbbdd
/**
* Proview $Id: co_time.h,v 1.
8 2006-12-10 14:33:34 lw
Exp $
* Proview $Id: co_time.h,v 1.
9 2008-09-18 15:08:12 claes
Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -127,6 +127,7 @@ pwr_tStatus time_SetTime (pwr_tTime*);
#endif
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_tDeltaTime
*
time_Uptime
(
pwr_tStatus
*
,
pwr_tDeltaTime
*
,
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