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

Add support for all Elixir time units #72

Merged
merged 3 commits into from
Feb 14, 2017
Merged

Conversation

thecodeboss
Copy link
Collaborator

To maintain consistency with the Elixir standard library, Elixometer should support all the same time units. These can be viewed at https://hexdocs.pm/elixir/System.html#t:time_unit/0.

I left in support for :micros and :millis so that this is not a breaking change, but I also made :microsecond the default.

@jparise
Copy link
Collaborator

jparise commented Feb 14, 2017

This looks good. Could you add test cover for the new types, too? That will turn the build green.

@thecodeboss
Copy link
Collaborator Author

Sure, I'll do that.

@sourcelevel-bot
Copy link

Hello, @thecodeboss! This is your first Pull Request that will be reviewed by Ebert, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

The time units default to *microseconds*, but you can pass in a unit of
`:millis` and the value will be converted.
The time units default to *microseconds*, but you can also pass in any of
the units in [`System.time_unit.t`](https://hexdocs.pm/elixir/System.html#t:time_unit/0),
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should be able to write just System.time_unit.t, and ex_doc will automatically linkify this for you.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had to fiddle with the syntax a little, but I was able to get t:System.time_unit/0 to link correctly.

@jparise jparise merged commit 8ef021a into pinterest:master Feb 14, 2017
@jparise
Copy link
Collaborator

jparise commented Feb 14, 2017

Thanks!

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.

2 participants