OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gin/public/v8_platform.h" | 5 #include "gin/public/v8_platform.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop/message_loop_proxy.h" | |
10 #include "base/threading/worker_pool.h" | 9 #include "base/threading/worker_pool.h" |
11 #include "gin/per_isolate_data.h" | 10 #include "gin/per_isolate_data.h" |
12 | 11 |
13 namespace gin { | 12 namespace gin { |
14 | 13 |
15 namespace { | 14 namespace { |
16 | 15 |
17 base::LazyInstance<V8Platform>::Leaky g_v8_platform = LAZY_INSTANCE_INITIALIZER; | 16 base::LazyInstance<V8Platform>::Leaky g_v8_platform = LAZY_INSTANCE_INITIALIZER; |
18 | 17 |
19 } // namespace | 18 } // namespace |
(...skipping 26 matching lines...) Expand all Loading... |
46 FROM_HERE, base::Bind(&v8::Task::Run, base::Owned(task)), | 45 FROM_HERE, base::Bind(&v8::Task::Run, base::Owned(task)), |
47 base::TimeDelta::FromSecondsD(delay_in_seconds)); | 46 base::TimeDelta::FromSecondsD(delay_in_seconds)); |
48 } | 47 } |
49 | 48 |
50 double V8Platform::MonotonicallyIncreasingTime() { | 49 double V8Platform::MonotonicallyIncreasingTime() { |
51 return base::TimeTicks::Now().ToInternalValue() / | 50 return base::TimeTicks::Now().ToInternalValue() / |
52 static_cast<double>(base::Time::kMicrosecondsPerSecond); | 51 static_cast<double>(base::Time::kMicrosecondsPerSecond); |
53 } | 52 } |
54 | 53 |
55 } // namespace gin | 54 } // namespace gin |
OLD | NEW |