26 Jan
2007
26 Jan
'07
2:38 a.m.
... [Tim]
fractional part of x == fmod(x, 1.0) == modf(x)[0], so you could use either.
[Anders J. Munch]
Actually, on the off chance that time.time() is negative, he can use neither. It has to be math.ceil, float.__mod__ or divmod.
If time.time() is negative, I expect this would be the least of his worries :-) Even on most Unixish boxes, Python's time.time() is immune to "the year 2038 problem" anyway, since it uses POSIX's gettimeofday() instead of C's time() when it can.
6294
Age (days ago)
6294
Last active (days ago)
0 comments
1 participants
participants (1)
-
Tim Peters