This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Guard against negative time deltas
Despite the use of `erlang:monotonic_time/0`, it is still possible on some platforms, such as sleeping/awakening laptops, for time to move in surprising directions. When this happens, and a negative time delta is passed to `timebin/1`, it crashes with: bad arithmetic expression at math:log10/1 <= ioq_server:timebin/1(line:480) This adds a guard to return `0` for negative numbers as well as zero.
- Loading branch information
Showing 1 changed file with 1 addition and 1 deletion.