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: time on 32 bits architecture #2492

Merged
merged 3 commits into from
Mar 1, 2024
Merged

fix: time on 32 bits architecture #2492

merged 3 commits into from
Mar 1, 2024

Conversation

SionoiS
Copy link
Contributor

@SionoiS SionoiS commented Feb 29, 2024

Copy of #2476 for merging purpose.

Description
The function getNanosecondTime does not > work on 32 bit architecture, so this is a suggestion of a fix.

Changes
Use int64.

To reproduce the problem
Pass --cpu:i386 -t:-m32 -l:-m32 to the nim compiler

Issue
closes # #2475

Copy link

github-actions bot commented Feb 29, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2492

Built from 901befe

Copy link
Collaborator

@Ivansete-status Ivansete-status left a comment

Choose a reason for hiding this comment

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

LGTM! Just a naïve question:)

timeInSecondsFloat64 = float64(secondsFloat)

## Then
check:
getNanosecondTime(timeInSecondsInt) == lowResTimestamp
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this check is not needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Removed these tests, as they are in contradiction with the change ( allow using the function on 32bit )

@SionoiS SionoiS merged commit 0a75122 into master Mar 1, 2024
8 of 10 checks passed
@SionoiS SionoiS deleted the fix--time-on-32-bit-arch branch March 1, 2024 12:58
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

4 participants