Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2025)

Side by Side Diff: webrtc/base/task_unittest.cc

Issue 1835053002: Change default timestamp to 64 bits in all webrtc directories. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO for timestamp. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/sharedexclusivelock_unittest.cc ('k') | webrtc/base/thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 15 matching lines...) Expand all
26 #include "webrtc/base/gunit.h" 26 #include "webrtc/base/gunit.h"
27 #include "webrtc/base/logging.h" 27 #include "webrtc/base/logging.h"
28 #include "webrtc/base/task.h" 28 #include "webrtc/base/task.h"
29 #include "webrtc/base/taskrunner.h" 29 #include "webrtc/base/taskrunner.h"
30 #include "webrtc/base/thread.h" 30 #include "webrtc/base/thread.h"
31 #include "webrtc/base/timeutils.h" 31 #include "webrtc/base/timeutils.h"
32 32
33 namespace rtc { 33 namespace rtc {
34 34
35 static int64_t GetCurrentTime() { 35 static int64_t GetCurrentTime() {
36 return static_cast<int64_t>(Time()) * 10000; 36 return TimeMillis() * 10000;
37 } 37 }
38 38
39 // feel free to change these numbers. Note that '0' won't work, though 39 // feel free to change these numbers. Note that '0' won't work, though
40 #define STUCK_TASK_COUNT 5 40 #define STUCK_TASK_COUNT 5
41 #define HAPPY_TASK_COUNT 20 41 #define HAPPY_TASK_COUNT 20
42 42
43 // this is a generic timeout task which, when it signals timeout, will 43 // this is a generic timeout task which, when it signals timeout, will
44 // include the unique ID of the task in the signal (we don't use this 44 // include the unique ID of the task in the signal (we don't use this
45 // in production code because we haven't yet had occasion to generate 45 // in production code because we haven't yet had occasion to generate
46 // an array of the same types of task) 46 // an array of the same types of task)
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 // Do not start the task. 534 // Do not start the task.
535 // Note: this leaks memory, so don't do this. 535 // Note: this leaks memory, so don't do this.
536 // Instead, always run your tasks or delete them. 536 // Instead, always run your tasks or delete them.
537 new HappyTask(happy_task); 537 new HappyTask(happy_task);
538 538
539 // run the unblocked tasks 539 // run the unblocked tasks
540 task_runner.RunTasks(); 540 task_runner.RunTasks();
541 } 541 }
542 542
543 } // namespace rtc 543 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/sharedexclusivelock_unittest.cc ('k') | webrtc/base/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698