diff options
Diffstat (limited to '')
-rw-r--r-- | doubletotimespec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doubletotimespec.c b/doubletotimespec.c index a104b37..02f40e9 100644 --- a/doubletotimespec.c +++ b/doubletotimespec.c @@ -6,7 +6,8 @@ void libsimple_doubletotimespec(struct timespec *ts, double d) { - double ns = (long long int)d; + long long int d_integer = (long long int)d; + double ns = (double)d_integer; long int nsi; ns = d - ns; ns *= (double)1000000000L; |