Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upClarify the doc for Time.every #503
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Feb 18, 2016
Contributor
Actually, saying "milliseconds" there is at odds with the advice further above in the documentation:
Using the
Timeconstants instead of raw numbers is very highly recommended.
For example, for a call Time.every (3 * second) it seems strange to say that it is updated every "3 second milliseconds".
So I think the better change to the documentation here would be not to add "milliseconds" in the text, but instead replace the example expression every 100 in the next line by every (100 * millisecond).
Put differently, the "milliseconds" is an implementation detail. It could be changed at any time (without anything in the current documentation becoming wrong). If people keep to the advice to use the time constants, such a change will have no effect on them. But your documentation proposal would become false then.
|
Actually, saying "milliseconds" there is at odds with the advice further above in the documentation:
For example, for a call So I think the better change to the documentation here would be not to add "milliseconds" in the text, but instead replace the example expression Put differently, the "milliseconds" is an implementation detail. It could be changed at any time (without anything in the current documentation becoming wrong). If people keep to the advice to use the time constants, such a change will have no effect on them. But your documentation proposal would become false then. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Janiczek
Feb 18, 2016
Contributor
@jvoigtlaender That makes sense. I agree about replacing every 100 by something more clear. It begs the question "100 of what?" which I wanted to answer in the doc but is really better answered in the code by using an "unit."
|
@jvoigtlaender That makes sense. I agree about replacing |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Cool. If you squash the two commits into one, I will merge. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I hope force push was the right thing to do :D |
Janiczek commentedFeb 18, 2016
What unit is the first argument in (it is milliseconds).