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

Side by Side Diff: Source/platform/TimerHeapEntry.cpp

Issue 959263002: WIP - not ready for review (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Decouple TimerHeap and ThreadTimers. Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/TimerHeapEntry.h ('k') | Source/platform/blink_platform.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "platform/TimerHeapEntry.h"
7
8 #include "platform/Timer.h"
9 #include "platform/TimerHeap.h"
10 #include <limits>
11
12 namespace blink {
13
14 TimerHeapEntry::TimerHeapEntry(TimerHeap* owner)
15 : m_owner(owner)
16 , m_state(TimerHeapEntryNotInHeap)
17 , m_value(0)
18 , m_heapIndex(std::numeric_limits<std::size_t>::max())
19 {
20 ASSERT(m_owner);
21 }
22
23 TimerHeapEntry::~TimerHeapEntry()
24 {
25 }
26
27 void TimerHeapEntry::setValue(TimerBase& timer, double newValue)
28 {
29 ASSERT(&timer.heapEntry() == this);
30
31 double oldValue = m_value;
32 m_value = newValue;
33 m_owner->didChangeValue(timer, oldValue);
34 }
35
36 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/TimerHeapEntry.h ('k') | Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698