Skip to content

Conversation

@niaow
Copy link
Member

@niaow niaow commented Nov 10, 2019

The problem currently with #680 failing to pass tests appears to be that ticks() is returning corrupted time values. This PR fixes that by correcting some definitions for timing functions.

@niaow niaow added the bug Something isn't working label Nov 10, 2019
@deadprogram
Copy link
Member

Seems reasonable. Merging.

@deadprogram deadprogram merged commit ad73a72 into tinygo-org:dev Nov 11, 2019
tv_sec int64
tv_nsec int64
tv_sec timeT
tv_nsec timeT
Copy link
Member

Choose a reason for hiding this comment

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

This can be implemented much simpler: int is 32-bit on 32-bit systems and 64-bit on 64-bit systems. This matches gc and I see no reason to change that behavior.
This is different from C because Go is not tied to C legacy where int is usually 32-bit even on 64-bit platforms and you can't rely on any particular behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants