summaryrefslogtreecommitdiffstats
path: root/base/event_recorder.cc
diff options
context:
space:
mode:
authordeanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-09 08:58:51 +0000
committerdeanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-09 08:58:51 +0000
commitc5324208455858b3393a3e1887366f858c588a2d (patch)
treef6bc89be1a437d7aa1c6fbd5c0dc98ad2b3ff5b4 /base/event_recorder.cc
parent08de3cde4d95e9c962aee2386d7297d561404513 (diff)
downloadchromium_src-c5324208455858b3393a3e1887366f858c588a2d.zip
chromium_src-c5324208455858b3393a3e1887366f858c588a2d.tar.gz
chromium_src-c5324208455858b3393a3e1887366f858c588a2d.tar.bz2
Reapply r1633 (which was reverted by r1635), with some additional modifications. Consolidate all timer resolution code to time.h, and always depend on TimeTicks::Now for 1ms resolution.
Review URL: http://codereview.chromium.org/1806 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1893 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/event_recorder.cc')
-rw-r--r--base/event_recorder.cc10
1 files changed, 0 insertions, 10 deletions
diff --git a/base/event_recorder.cc b/base/event_recorder.cc
index 23c092f..ddc7617 100644
--- a/base/event_recorder.cc
+++ b/base/event_recorder.cc
@@ -53,9 +53,6 @@ bool EventRecorder::StartRecording(std::wstring& filename) {
return false;
}
- // Set the faster clock, if possible.
- ::timeBeginPeriod(1);
-
// Set the recording hook. JOURNALRECORD can only be used as a global hook.
journal_hook_ = ::SetWindowsHookEx(WH_JOURNALRECORD, StaticRecordWndProc,
GetModuleHandle(NULL), 0);
@@ -79,8 +76,6 @@ void EventRecorder::StopRecording() {
return;
}
- ::timeEndPeriod(1);
-
DCHECK(file_ != NULL);
fclose(file_);
file_ = NULL;
@@ -109,9 +104,6 @@ bool EventRecorder::StartPlayback(std::wstring& filename) {
return false;
}
- // Set the faster clock, if possible.
- ::timeBeginPeriod(1);
-
// Playback time is tricky. When playing back, we read a series of events,
// each with timeouts. Simply subtracting the delta between two timers will
// lead to fast playback (about 2x speed). The API has two events, one
@@ -150,8 +142,6 @@ void EventRecorder::StopPlayback() {
fclose(file_);
file_ = NULL;
- ::timeEndPeriod(1);
-
journal_hook_ = NULL;
is_playing_ = false;
}