| 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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 // Convert to seconds and microseconds | 588 // Convert to seconds and microseconds |
| 589 *secs = static_cast<uint32_t>(usertime / 1000000); | 589 *secs = static_cast<uint32_t>(usertime / 1000000); |
| 590 *usecs = static_cast<uint32_t>(usertime % 1000000); | 590 *usecs = static_cast<uint32_t>(usertime % 1000000); |
| 591 return 0; | 591 return 0; |
| 592 } | 592 } |
| 593 | 593 |
| 594 | 594 |
| 595 // Returns current time as the number of milliseconds since | 595 // Returns current time as the number of milliseconds since |
| 596 // 00:00:00 UTC, January 1, 1970. | 596 // 00:00:00 UTC, January 1, 1970. |
| 597 double OS::TimeCurrentMillis() { | 597 double OS::TimeCurrentMillis() { |
| 598 Win32Time t; | 598 return Time::Now().ToJsTime(); |
| 599 t.SetToCurrentTime(); | |
| 600 return t.ToJSTime(); | |
| 601 } | 599 } |
| 602 | 600 |
| 603 | 601 |
| 604 // Returns a string identifying the current timezone taking into | 602 // Returns a string identifying the current timezone taking into |
| 605 // account daylight saving. | 603 // account daylight saving. |
| 606 const char* OS::LocalTimezone(double time) { | 604 const char* OS::LocalTimezone(double time) { |
| 607 return Win32Time(time).LocalTimezone(); | 605 return Win32Time(time).LocalTimezone(); |
| 608 } | 606 } |
| 609 | 607 |
| 610 | 608 |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1520 ASSERT(result); | 1518 ASSERT(result); |
| 1521 } | 1519 } |
| 1522 | 1520 |
| 1523 | 1521 |
| 1524 | 1522 |
| 1525 void Thread::YieldCPU() { | 1523 void Thread::YieldCPU() { |
| 1526 Sleep(0); | 1524 Sleep(0); |
| 1527 } | 1525 } |
| 1528 | 1526 |
| 1529 } } // namespace v8::internal | 1527 } } // namespace v8::internal |
| OLD | NEW |