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

Implement no_std #33

Closed
wants to merge 2 commits into from
Closed

Implement no_std #33

wants to merge 2 commits into from

Conversation

Kijewski
Copy link
Contributor

No description provided.

@Kijewski Kijewski marked this pull request as draft July 22, 2022 20:34
@Kijewski
Copy link
Contributor Author

Before I work further on this PR, can you tell me if it is wanted at all? It works "mostly", except for the most important part: replacing SystemTime::now(). Rustix seems to work fine on Unices, but on windows clock_gettime() is not supported and I don't have high hopes that is ever will be. But I could experiment with libc, or even winapi.

@Kijewski
Copy link
Contributor Author

Related issue Kijewski/tzdb#71. Cc @baoyachi.

@x-hgg-x
Copy link
Owner

x-hgg-x commented Jul 22, 2022

We don't need to put UtcDateTime::now() and DateTime::now() in the no-std part, since they are simple wrappers of UtcDateTime::from_timespec() and DateTime::from_timespec().

If the calling code want to get the current time, it can use whatever is available on the target platform and then call the *::from_timespec() methods.

@Kijewski Kijewski changed the title WIP: implement no_std Implement no_std Jul 25, 2022
@Kijewski Kijewski marked this pull request as ready for review July 25, 2022 05:36
x-hgg-x pushed a commit that referenced this pull request Jul 25, 2022
@x-hgg-x
Copy link
Owner

x-hgg-x commented Jul 25, 2022

Implemented in 3eae3eb.

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

2 participants