79393466

Date: 2025-01-28 10:37:59
Score: 1.5
Natty:
Report link

Did you check if UInt64(total - id) * 1_000_000_000 statement overflows?

If so you could try something like this: let (value, overflowOccurred) = interval.multipliedReportingOverflow(by: 1_000_000_000) and then check overflowOccurred value

I've tried try await Task.sleep(nanoseconds: Int64.max) and it completes immediately. At the same time documentation doesn't state which max value could be passed to this method.

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Did you
  • Low reputation (1):
Posted by: Volodymyr Sakharevych