Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Linux compilation issue of ProfilingATNSimulator #4601

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

WillDignazio
Copy link

  • NSEC_PER_SEC is available via CDispatch bindings, which are not currently imported
  • Importing them would be heavy handed compared to replacing with the constant (and leaving a comment)

Compiling on Linux currently produces:

         [239/269] Compiling Antlr4 SetTransition.swift
         /workspace/.build/checkouts/antlr4/runtime/Swift/Sources/Antlr4/atn/ProfilingATNSimulator.swift:63:85: error: cannot find 'NSEC_PER_SEC' in scope
         decisions[decision].timeInPrediction += Int64((stop - start) * TimeInterval(NSEC_PER_SEC))

After fixing this, it compiles (and behaves) as expected.

* NSEC_PER_SEC is available via CDispatch bindings, which are not currently imported
* Importing them would be heavy handed compared to replacing with the constant (and leaving a comment)

Signed-off-by: Will Ziener-Dignazio <wzienerdignazio@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant