[SR-2807] Dispatch{Wall,}Time behave unexpectedly #45411
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
run-time crash
Bug → crash: Swift code crashed during execution
SDKOverlay
standard library
Area: Standard library umbrella
Environment
OS X 10.12, Xcode 8.0 and 8.1b both exhibit this behaviour.
Additional Detail from JIRA
md5: 99417332db9394130db3b9856aea74ff
Issue Description:
I was trying to build a test scheduler using DispatchTime and DispatchWallTime as the base type, and started out by creating (what I thought was) a zero-valued timestamp.
During this exercise, I found out that the following are problematic:
1: DispatchWallTime appears to crash during a comparison. See the below REPL session:
2: Constructing a DispatchTime using an uptime value of 0 causes unexpected results. See the following REPL session:
Hopefully this is enough to explain what's going on!
The text was updated successfully, but these errors were encountered: