Reland "Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTi...
authorbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 28 Aug 2013 13:03:06 +0000 (13:03 +0000)
committerbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 28 Aug 2013 13:03:06 +0000 (13:03 +0000)
commite2b4525397c30598b457d864ac87ba29b7b5caf8
tree420873d9a497383c0e61484c8d7efec9e649494f
parent9d0b1590a5d929c15408b235e208f829a76f48ec
Reland "Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class."

These classes are meant to replace OS::Ticks() and OS::TimeCurrentMillis(),
which are broken in several ways. The ElapsedTimer class implements a
stopwatch using TimeTicks::HighResNow() for high resolution, monotonic
timing.

Also fix the CpuProfile::GetStartTime() and CpuProfile::GetEndTime()
methods to actually return the time relative to the unix epoch as stated
in the documentation (previously that was relative to some arbitrary
point in time, i.e. boot time).

BUG=v8:2853
R=machenbach@chromium.org

Review URL: https://codereview.chromium.org/23469013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
33 files changed:
src/api.cc
src/compiler.cc
src/compiler.h
src/counters.cc
src/counters.h
src/cpu-profiler.cc
src/cpu-profiler.h
src/deoptimizer.cc
src/hydrogen.cc
src/hydrogen.h
src/lithium-allocator.cc
src/log.cc
src/log.h
src/optimizing-compiler-thread.cc
src/optimizing-compiler-thread.h
src/parser.cc
src/platform-linux.cc
src/platform-macos.cc
src/platform-openbsd.cc
src/platform-posix.cc
src/platform-win32.cc
src/platform.h
src/platform/elapsed-timer.h [new file with mode: 0644]
src/platform/time.cc [new file with mode: 0644]
src/platform/time.h [new file with mode: 0644]
src/profile-generator.cc
src/profile-generator.h
src/win32-headers.h
src/win32-math.cc
test/cctest/cctest.gyp
test/cctest/test-cpu-profiler.cc
test/cctest/test-time.cc [new file with mode: 0644]
tools/gyp/v8.gyp