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

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

Issue 1094014: Merge the partial_snapshots branch back into bleeding_edge. For... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 // Finally, compute the actual time. Why is this so hard. 504 // Finally, compute the actual time. Why is this so hard.
505 DWORD elapsed = ticks_now - init_ticks; 505 DWORD elapsed = ticks_now - init_ticks;
506 this->time_.t_ = init_time.t_ + (static_cast<int64_t>(elapsed) * 10000); 506 this->time_.t_ = init_time.t_ + (static_cast<int64_t>(elapsed) * 10000);
507 } 507 }
508 508
509 509
510 // Return the local timezone offset in milliseconds east of UTC. This 510 // Return the local timezone offset in milliseconds east of UTC. This
511 // takes into account whether daylight saving is in effect at the time. 511 // takes into account whether daylight saving is in effect at the time.
512 // Only times in the 32-bit Unix range may be passed to this function. 512 // Only times in the 32-bit Unix range may be passed to this function.
513 // Also, adding the time-zone offset to the input must not overflow. 513 // Also, adding the time-zone offset to the input must not overflow.
514 // The function EquivalentTime() in date-delay.js guarantees this. 514 // The function EquivalentTime() in date.js guarantees this.
515 int64_t Time::LocalOffset() { 515 int64_t Time::LocalOffset() {
516 // Initialize timezone information, if needed. 516 // Initialize timezone information, if needed.
517 TzSet(); 517 TzSet();
518 518
519 Time rounded_to_second(*this); 519 Time rounded_to_second(*this);
520 rounded_to_second.t() = rounded_to_second.t() / 1000 / kTimeScaler * 520 rounded_to_second.t() = rounded_to_second.t() / 1000 / kTimeScaler *
521 1000 * kTimeScaler; 521 1000 * kTimeScaler;
522 // Convert to local time using POSIX localtime function. 522 // Convert to local time using POSIX localtime function.
523 // Windows XP Service Pack 3 made SystemTimeToTzSpecificLocalTime() 523 // Windows XP Service Pack 3 made SystemTimeToTzSpecificLocalTime()
524 // very slow. Other browsers use localtime(). 524 // very slow. Other browsers use localtime().
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 1900
1901 // Release the thread handles 1901 // Release the thread handles
1902 CloseHandle(data_->sampler_thread_); 1902 CloseHandle(data_->sampler_thread_);
1903 CloseHandle(data_->profiled_thread_); 1903 CloseHandle(data_->profiled_thread_);
1904 } 1904 }
1905 1905
1906 1906
1907 #endif // ENABLE_LOGGING_AND_PROFILING 1907 #endif // ENABLE_LOGGING_AND_PROFILING
1908 1908
1909 } } // namespace v8::internal 1909 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698