Changeset 58429 in webkit for trunk/JavaScriptCore/wtf/CurrentTime.cpp
- Timestamp:
- Apr 28, 2010, 2:02:13 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/CurrentTime.cpp
r54183 r58429 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.All rights reserved.2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2008 Google Inc. All rights reserved. 4 4 * Copyright (C) 2007-2009 Torch Mobile, Inc. … … 54 54 #endif 55 55 56 #elif PLATFORM(CF)57 #include <CoreFoundation/CFDate.h>58 56 #elif PLATFORM(GTK) 59 57 #include <glib.h> … … 62 60 #elif PLATFORM(BREWMP) 63 61 #include <AEEStdLib.h> 64 #else // Posix systems relying on the gettimeofday()62 #else 65 63 #include <sys/time.h> 66 64 #endif … … 252 250 #endif // USE(QUERY_PERFORMANCE_COUNTER) 253 251 254 #elif PLATFORM(CF)255 256 double currentTime()257 {258 return CFAbsoluteTimeGetCurrent() + kCFAbsoluteTimeIntervalSince1970;259 }260 261 252 #elif PLATFORM(GTK) 262 253 … … 294 285 } 295 286 296 #else // Other Posix systems rely on the gettimeofday().287 #else 297 288 298 289 double currentTime() 299 290 { 300 291 struct timeval now; 301 struct timezone zone; 302 303 gettimeofday(&now, &zone); 304 return static_cast<double>(now.tv_sec) + (double)(now.tv_usec / 1000000.0); 292 gettimeofday(&now, 0); 293 return now.tv_sec + now.tv_usec / 1000000.0; 305 294 } 306 295
Note:
See TracChangeset
for help on using the changeset viewer.