Deflake PluginMetricsProviderTest.RecordCurrentStateWithDelay.

This test is flaky on platforms that where Sleep(delta) isn't
guaranteed to be in TimeTicks (e.g. on Mac, it's in base::Time).
Use base::test::ScopedTaskEnvironment::MainThreadType::MOCK_TIME

Also, cleans up some APIs and adds a comment to the Sleep() API.

Bug: 915672
Change-Id: Ib539c0d06a217dfdb9ee6f7411e885d6975438a9
Commit-Queue: Alexei Svitkine <>
Reviewed-by: Gabriel Charette <>
Cr-Commit-Position: refs/heads/master@{#625387}
4 files changed