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

Update timer operations with new time type (secs24p8) #39

Merged
merged 5 commits into from
Oct 7, 2024

Conversation

biosbob
Copy link
Member

@biosbob biosbob commented Oct 6, 2024

major refactor/cleanup of WakeupTimer + Uptimer functionality....

before merging into staging, we should "fine-tune" any names for clarity....

Closes #38

@biosbob biosbob requested a review from gcohler October 6, 2024 22:42
@biosbob biosbob added this to the v25.0.3 milestone Oct 6, 2024
@biosbob biosbob added bug Something isn't working enhancement New feature or request labels Oct 6, 2024
@biosbob biosbob self-assigned this Oct 6, 2024
@biosbob biosbob marked this pull request as ready for review October 6, 2024 22:43
Copy link
Collaborator

@gcohler gcohler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. My general feeling is that it's better to use *, /, + rather than <<, >>, | because it's more general.

@gcohler gcohler changed the title issue38 Update timer operations with new time type (secs24p8) Oct 7, 2024
Copy link
Member Author

@biosbob biosbob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost all compilers will "optimize" multiply / divide by powers of two as a << or >> respectively.... i acltually prefer the shift operators, since i know what's happening.... 65536 feels like "more" of a magic number than 1 << 16 does...

i'm also trying to encapsulate these formulas as much as possible – ultimately in a concrete Secs_24p8 struct type that otherwise incurs no additional runtime overhead....

@gcohler
Copy link
Collaborator

gcohler commented Oct 7, 2024

OK. Let me know if you want me to merge etc.

@gcohler gcohler merged commit 1be5f0c into staging Oct 7, 2024
@gcohler gcohler deleted the biosbob/issue38 branch October 7, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants