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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 // Clean up platform-OS-related things. Called once at VM shutdown. | 186 // Clean up platform-OS-related things. Called once at VM shutdown. |
187 static void TearDown(); | 187 static void TearDown(); |
188 | 188 |
189 // Returns the accumulated user time for thread. This routine | 189 // Returns the accumulated user time for thread. This routine |
190 // can be used for profiling. The implementation should | 190 // can be used for profiling. The implementation should |
191 // strive for high-precision timer resolution, preferable | 191 // strive for high-precision timer resolution, preferable |
192 // micro-second resolution. | 192 // micro-second resolution. |
193 static int GetUserTime(uint32_t* secs, uint32_t* usecs); | 193 static int GetUserTime(uint32_t* secs, uint32_t* usecs); |
194 | 194 |
| 195 // Get a tick counter normalized to one tick per microsecond. |
| 196 // Used for calculating time intervals. |
| 197 static int64_t Ticks(); |
| 198 |
195 // Returns current time as the number of milliseconds since | 199 // Returns current time as the number of milliseconds since |
196 // 00:00:00 UTC, January 1, 1970. | 200 // 00:00:00 UTC, January 1, 1970. |
197 static double TimeCurrentMillis(); | 201 static double TimeCurrentMillis(); |
198 | 202 |
199 // Returns a string identifying the current time zone. The | 203 // Returns a string identifying the current time zone. The |
200 // timestamp is used for determining if DST is in effect. | 204 // timestamp is used for determining if DST is in effect. |
201 static const char* LocalTimezone(double time); | 205 static const char* LocalTimezone(double time); |
202 | 206 |
203 // Returns the local time offset in milliseconds east of UTC without | 207 // Returns the local time offset in milliseconds east of UTC without |
204 // taking daylight savings time into account. | 208 // taking daylight savings time into account. |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 static uint16_t HToN(uint16_t value); | 791 static uint16_t HToN(uint16_t value); |
788 static uint16_t NToH(uint16_t value); | 792 static uint16_t NToH(uint16_t value); |
789 static uint32_t HToN(uint32_t value); | 793 static uint32_t HToN(uint32_t value); |
790 static uint32_t NToH(uint32_t value); | 794 static uint32_t NToH(uint32_t value); |
791 }; | 795 }; |
792 | 796 |
793 | 797 |
794 } } // namespace v8::internal | 798 } } // namespace v8::internal |
795 | 799 |
796 #endif // V8_PLATFORM_H_ | 800 #endif // V8_PLATFORM_H_ |
OLD | NEW |