-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
Not always of course, but in some cases timeToLive() returns floats.
Which makes sense since in maxAge() there's a division by 1000 and then later a multiplication by 1000 done by timeToLive(), yet the code ignores computers' struggle with float arithmetic.
Since the doc mentions timeToLive() returns time in milliseconds, one would expect it to return an integer.
Math.round() in the correct spot or some other solution would be appreciated, let me know what you think.
Metadata
Metadata
Assignees
Labels
No labels