Great idea, I'll add that to the list! Times actually are on that page too,
I just didn't know about performance.now() as an alternative.

Also, it was pointed out to me that in order to answer question 1) it would
help to know how to disable these rules. Eslint rules can be disabled at
the line or file level via comments. They can also be disabled at the
directory level in .eslintrc.js. So anyone wanting to legitimately use
these patterns would need to figure out the most appropriate way to disable
the corresponding rule.


On Thu, Jul 6, 2017 at 3:45 PM, Chris Peterson <cpeter...@mozilla.com>
wrote:

>
>
> On 7/6/17 11:47 AM, Andrew Halberstadt wrote:
>
> - Are there additional things not listed on that page that we could lint
> for?
>
>
> Do we want to discourage tests from using Date (`new Date` or
> `Date.now()`) for measuring time? Dates are affected by time zones, DST,
> and clock skew issues jumping forward or backward. The performance.now()
> API doesn't have any of those problems, plus it uses high-resolution
> timestamps with 5 microsecond resolution instead of 1 millisecond. In bug
> 1372261, mconley is changing the tps Talos test to use 
> performance.timing.navigationStart
> + performance.now().
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to