| Index: base/time_win_unittest.cc
|
| diff --git a/base/time_win_unittest.cc b/base/time_win_unittest.cc
|
| index 7ac36629e6808cce34550539d0b5fa72d83dc8ab..c362e03fce650ae30444c677ea4e0376bad5a924 100644
|
| --- a/base/time_win_unittest.cc
|
| +++ b/base/time_win_unittest.cc
|
| @@ -163,10 +163,28 @@ TEST(TimeTicks, QueryPerformanceFrequency) {
|
| frequency.QuadPart / 1000000.0);
|
| }
|
|
|
| +TimeTicks GetTickCountTest() {
|
| + return TimeTicks::FromInternalValue(GetTickCount64());
|
| +}
|
| +
|
| +TimeTicks RDTSCTest() {
|
| + return TimeTicks::FromInternalValue(__rdtsc());
|
| +}
|
| +
|
| +TimeTicks TimeGetTimeTest() {
|
| + return TimeTicks::FromInternalValue(timeGetTime());
|
| +}
|
| +
|
| +TimeTicks QPCTest() {
|
| + LARGE_INTEGER out;
|
| + QueryPerformanceCounter(&out);
|
| + return TimeTicks::FromInternalValue(out.QuadPart);
|
| +}
|
| +
|
| TEST(TimeTicks, TimerPerformance) {
|
| // Verify that various timer mechanisms can always complete quickly.
|
| // Note: This is a somewhat arbitrary test.
|
| - const int kLoops = 10000;
|
| + const int kLoops = 10000000;
|
| // Due to the fact that these run on bbots, which are horribly slow,
|
| // we can't really make any guarantees about minimum runtime.
|
| // Really, we want these to finish in ~10ms, and that is generous.
|
| @@ -183,6 +201,10 @@ TEST(TimeTicks, TimerPerformance) {
|
| test_only_works_with_same_sizes);
|
| TestCase cases[] = {
|
| { reinterpret_cast<TestFunc>(Time::Now), "Time::Now" },
|
| + { GetTickCountTest, "GetTickCount64" },
|
| + { RDTSCTest, "__rdtsc" },
|
| + { TimeGetTimeTest, "timeGetTime" },
|
| + { QPCTest, "QueryPerformanceCounter" },
|
| { TimeTicks::Now, "TimeTicks::Now" },
|
| { TimeTicks::HighResNow, "TimeTicks::HighResNow" },
|
| { NULL, "" }
|
|
|