return time as an int64, not as a float.
This commit is contained in:
parent
42ff655ae5
commit
a41627ef1d
@ -349,7 +349,13 @@ MarkExecutable(const char *name)
|
|||||||
|
|
||||||
int
|
int
|
||||||
unifyTime(term_t t, time_t time)
|
unifyTime(term_t t, time_t time)
|
||||||
{ return PL_unify_float(t, (double)time);
|
{
|
||||||
|
#if __YAP_PROLOG__
|
||||||
|
/* maintain compatibility with old Prolog systems, and avoid losing precision unnecessarily */
|
||||||
|
return PL_unify_int64(t, (int64_t)time);
|
||||||
|
#else
|
||||||
|
return PL_unify_float(t, (double)time);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user