Commit d4d66a71 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Replace uses of MUST_USE_RESULT by V8_WARN_UNUSED_RESULT in ElapsedTimer.

R=bmeurer@chromium.org
Signed-off-by: 's avatarThiago Farina <tfarina@chromium.org>

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

Patch from Thiago Farina <tfarina@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 119b59ac
......@@ -87,7 +87,7 @@ class ElapsedTimer V8_FINAL BASE_EMBEDDED {
// Returns the time elapsed since the previous start. This method may only
// be called on a previously started timer.
MUST_USE_RESULT TimeDelta Elapsed() const {
TimeDelta Elapsed() const V8_WARN_UNUSED_RESULT {
ASSERT(IsStarted());
TimeDelta elapsed = Now() - start_ticks_;
ASSERT(elapsed.InMicroseconds() >= 0);
......@@ -97,13 +97,13 @@ class ElapsedTimer V8_FINAL BASE_EMBEDDED {
// Returns |true| if the specified |time_delta| has elapsed since the
// previous start, or |false| if not. This method may only be called on
// a previously started timer.
MUST_USE_RESULT bool HasExpired(TimeDelta time_delta) const {
bool HasExpired(TimeDelta time_delta) const V8_WARN_UNUSED_RESULT {
ASSERT(IsStarted());
return Elapsed() >= time_delta;
}
private:
MUST_USE_RESULT V8_INLINE(static TimeTicks Now()) {
V8_INLINE(static TimeTicks Now()) V8_WARN_UNUSED_RESULT {
TimeTicks now = TimeTicks::HighResNow();
ASSERT(!now.IsNull());
return now;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment