return time as an int64, not as a float.

This commit is contained in:
Vitor Santos Costa 2011-02-12 00:45:00 +00:00
parent 42ff655ae5
commit a41627ef1d

View File

@ -349,7 +349,13 @@ MarkExecutable(const char *name)
int
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
}