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 | |
199 // Returns current time as the number of milliseconds since | 195 // Returns current time as the number of milliseconds since |
200 // 00:00:00 UTC, January 1, 1970. | 196 // 00:00:00 UTC, January 1, 1970. |
201 static double TimeCurrentMillis(); | 197 static double TimeCurrentMillis(); |
202 | 198 |
203 // Returns a string identifying the current time zone. The | 199 // Returns a string identifying the current time zone. The |
204 // timestamp is used for determining if DST is in effect. | 200 // timestamp is used for determining if DST is in effect. |
205 static const char* LocalTimezone(double time); | 201 static const char* LocalTimezone(double time); |
206 | 202 |
207 // Returns the local time offset in milliseconds east of UTC without | 203 // Returns the local time offset in milliseconds east of UTC without |
208 // taking daylight savings time into account. | 204 // taking daylight savings time into account. |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 static uint16_t HToN(uint16_t value); | 785 static uint16_t HToN(uint16_t value); |
790 static uint16_t NToH(uint16_t value); | 786 static uint16_t NToH(uint16_t value); |
791 static uint32_t HToN(uint32_t value); | 787 static uint32_t HToN(uint32_t value); |
792 static uint32_t NToH(uint32_t value); | 788 static uint32_t NToH(uint32_t value); |
793 }; | 789 }; |
794 | 790 |
795 | 791 |
796 } } // namespace v8::internal | 792 } } // namespace v8::internal |
797 | 793 |
798 #endif // V8_PLATFORM_H_ | 794 #endif // V8_PLATFORM_H_ |
OLD | NEW |