| OLD | NEW |
| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 177 } |
| 178 } | 178 } |
| 179 | 179 |
| 180 | 180 |
| 181 void OS::SignalCodeMovingGC() { | 181 void OS::SignalCodeMovingGC() { |
| 182 } | 182 } |
| 183 | 183 |
| 184 | 184 |
| 185 const char* OS::LocalTimezone(double time) { | 185 const char* OS::LocalTimezone(double time) { |
| 186 if (std::isnan(time)) return ""; | 186 if (std::isnan(time)) return ""; |
| 187 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); | 187 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); |
| 188 struct tm* t = localtime(&tv); | 188 struct tm* t = localtime(&tv); |
| 189 if (NULL == t) return ""; | 189 if (NULL == t) return ""; |
| 190 return t->tm_zone; | 190 return t->tm_zone; |
| 191 } | 191 } |
| 192 | 192 |
| 193 | 193 |
| 194 double OS::LocalTimeOffset() { | 194 double OS::LocalTimeOffset() { |
| 195 time_t tv = time(NULL); | 195 time_t tv = time(NULL); |
| 196 struct tm* t = localtime(&tv); | 196 struct tm* t = localtime(&tv); |
| 197 // tm_gmtoff includes any daylight savings offset, so subtract it. | 197 // tm_gmtoff includes any daylight savings offset, so subtract it. |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 bool VirtualMemory::ReleaseRegion(void* address, size_t size) { | 326 bool VirtualMemory::ReleaseRegion(void* address, size_t size) { |
| 327 return munmap(address, size) == 0; | 327 return munmap(address, size) == 0; |
| 328 } | 328 } |
| 329 | 329 |
| 330 | 330 |
| 331 bool VirtualMemory::HasLazyCommits() { | 331 bool VirtualMemory::HasLazyCommits() { |
| 332 return false; | 332 return false; |
| 333 } | 333 } |
| 334 | 334 |
| 335 } } // namespace v8::internal | 335 } } // namespace v8::internal |
| OLD | NEW |