• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 the V8 project 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 "src/runtime/runtime-utils.h"
6 
7 #include "src/date/date.h"
8 #include "src/execution/arguments.h"
9 #include "src/execution/isolate-inl.h"
10 #include "src/heap/factory.h"
11 #include "src/logging/counters.h"
12 #include "src/numbers/conversions-inl.h"
13 
14 namespace v8 {
15 namespace internal {
16 
RUNTIME_FUNCTION(Runtime_DateCurrentTime)17 RUNTIME_FUNCTION(Runtime_DateCurrentTime) {
18   HandleScope scope(isolate);
19   DCHECK_EQ(0, args.length());
20   return *isolate->factory()->NewNumber(JSDate::CurrentTimeValue(isolate));
21 }
22 
23 }  // namespace internal
24 }  // namespace v8
25