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

Side by Side Diff: src/platform-win32.cc

Issue 193933002: Invalidate OS-specific datetime cache on configuration change notification (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 6 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 | « src/platform-posix.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // at the time. 244 // at the time.
245 int64_t LocalOffset(); 245 int64_t LocalOffset();
246 246
247 // Returns the daylight savings time offset for the time in milliseconds. 247 // Returns the daylight savings time offset for the time in milliseconds.
248 int64_t DaylightSavingsOffset(); 248 int64_t DaylightSavingsOffset();
249 249
250 // Returns a string identifying the current timezone for the 250 // Returns a string identifying the current timezone for the
251 // timestamp taking into account daylight saving. 251 // timestamp taking into account daylight saving.
252 char* LocalTimezone(); 252 char* LocalTimezone();
253 253
254 static void TimeZoneChanged() { tz_initialized_ = false; }
255
254 private: 256 private:
255 // Constants for time conversion. 257 // Constants for time conversion.
256 static const int64_t kTimeEpoc = 116444736000000000LL; 258 static const int64_t kTimeEpoc = 116444736000000000LL;
257 static const int64_t kTimeScaler = 10000; 259 static const int64_t kTimeScaler = 10000;
258 static const int64_t kMsPerMinute = 60000; 260 static const int64_t kMsPerMinute = 60000;
259 261
260 // Constants for timezone information. 262 // Constants for timezone information.
261 static const int kTzNameSize = 128; 263 static const int kTzNameSize = 128;
262 static const bool kShortTzNames = false; 264 static const bool kShortTzNames = false;
263 265
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 606
605 607
606 // Returns the daylight savings offset in milliseconds for the given 608 // Returns the daylight savings offset in milliseconds for the given
607 // time. 609 // time.
608 double OS::DaylightSavingsOffset(double time) { 610 double OS::DaylightSavingsOffset(double time) {
609 int64_t offset = Win32Time(time).DaylightSavingsOffset(); 611 int64_t offset = Win32Time(time).DaylightSavingsOffset();
610 return static_cast<double>(offset); 612 return static_cast<double>(offset);
611 } 613 }
612 614
613 615
616 void OS::TimeZoneChanged() {
617 Win32Time::TimeZoneChanged();
618 }
619
620
614 int OS::GetLastError() { 621 int OS::GetLastError() {
615 return ::GetLastError(); 622 return ::GetLastError();
616 } 623 }
617 624
618 625
619 int OS::GetCurrentProcessId() { 626 int OS::GetCurrentProcessId() {
620 return static_cast<int>(::GetCurrentProcessId()); 627 return static_cast<int>(::GetCurrentProcessId());
621 } 628 }
622 629
623 630
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 ASSERT(result); 1511 ASSERT(result);
1505 } 1512 }
1506 1513
1507 1514
1508 1515
1509 void Thread::YieldCPU() { 1516 void Thread::YieldCPU() {
1510 Sleep(0); 1517 Sleep(0);
1511 } 1518 }
1512 1519
1513 } } // namespace v8::internal 1520 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698