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

common-dylan/timers.dylan: new function microsecond-counter #1626

Closed
wants to merge 1 commit into from

Conversation

cgay
Copy link
Member

@cgay cgay commented Sep 21, 2024

I needed some kind of low-level system counter to implement a clock() built-in while writing the interpreter in Crafting Interpreters and common-dylan:timers has almost the right thing and seems a natural place to add one.

This is for review...I'll modify the comments at a minimum before merging but for now they reflect some of my thought process.

@cgay cgay requested a review from housel September 21, 2024 21:35
cgay added a commit to cgay/time that referenced this pull request Oct 21, 2024
I needed some kind of low-level system counter to implement a clock() built-in
while writing the interpreter in Crafting Interpreters and common-dylan:timers
has almost the right thing and seems a natural place to add one.
@cgay
Copy link
Member Author

cgay commented Nov 6, 2024

This doesn't feel right yet. I think a timer should use nanoseconds. I could truncate the seconds to some arbitrary time in the past that would fit in a single integer, maybe? But it's not that important so I'm just closing this.

@cgay cgay closed this Nov 6, 2024
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.

1 participant