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

Windows: fix utime_mphal compilation, add ticks_cpu #2586

Merged
merged 2 commits into from
Nov 3, 2016

Conversation

stinos
Copy link
Contributor

@stinos stinos commented Nov 1, 2016

No description provided.

@@ -152,6 +152,9 @@ STATIC const mp_rom_map_elem_t mp_module_time_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_time), MP_ROM_PTR(&mod_time_time_obj) },
{ MP_ROM_QSTR(MP_QSTR_ticks_ms), MP_ROM_PTR(&mp_utime_ticks_ms_obj) },
{ MP_ROM_QSTR(MP_QSTR_ticks_us), MP_ROM_PTR(&mp_utime_ticks_us_obj) },
#ifdef _WIN32
{ MP_ROM_QSTR(MP_QSTR_ticks_cpu), MP_ROM_PTR(&mp_utime_ticks_cpu_obj) },
#endif
Copy link
Member

Choose a reason for hiding this comment

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

To reduce the number of #if's we should just have this line added for both unix and windows, ie without the #ifdef. It'll still compile but on unix ticks_cpu() will return 0. That's fine for now, it can be implemented later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, fixed.

@dpgeorge dpgeorge merged commit 3272afe into micropython:master Nov 3, 2016
@dpgeorge
Copy link
Member

dpgeorge commented Nov 3, 2016

Thank you.

@stinos stinos deleted the windows-utime-mphal branch November 3, 2016 12:55
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