Commit 076867aa authored by Claes Sjofors's avatar Claes Sjofors

Time function time_DToFloat64 added (refs #110)

parent f01be55f
...@@ -951,7 +951,7 @@ time_Float64ToD ( ...@@ -951,7 +951,7 @@ time_Float64ToD (
} }
//! Convert time to float. //! Convert time to Float32.
pwr_tFloat32 pwr_tFloat32
time_DToFloat ( time_DToFloat (
...@@ -967,6 +967,23 @@ time_DToFloat ( ...@@ -967,6 +967,23 @@ time_DToFloat (
return flt; 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_tClock
time_DtoClock ( time_DtoClock (
......
...@@ -192,6 +192,7 @@ pwr_tStatus time_SetTime (pwr_tTime*); ...@@ -192,6 +192,7 @@ pwr_tStatus time_SetTime (pwr_tTime*);
pwr_tDeltaTime * time_FloatToD (pwr_tDeltaTime*, pwr_tFloat32); pwr_tDeltaTime * time_FloatToD (pwr_tDeltaTime*, pwr_tFloat32);
pwr_tDeltaTime * time_Float64ToD (pwr_tDeltaTime*, pwr_tFloat64); pwr_tDeltaTime * time_Float64ToD (pwr_tDeltaTime*, pwr_tFloat64);
pwr_tFloat32 time_DToFloat (pwr_tFloat32*, pwr_tDeltaTime*); 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*); pwr_tDeltaTime * time_Uptime (pwr_tStatus*, pwr_tDeltaTime*, pwr_tDeltaTime*);
time_tClock time_Clock (pwr_tStatus*, pwr_tDeltaTime*); time_tClock time_Clock (pwr_tStatus*, pwr_tDeltaTime*);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment