OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_BASE_TIME_H_ | 5 #ifndef CHROME_COMMON_NET_NOTIFIER_BASE_TIME_H_ |
6 #define CHROME_BROWSER_SYNC_NOTIFIER_BASE_TIME_H_ | 6 #define CHROME_COMMON_NET_NOTIFIER_BASE_TIME_H_ |
7 | 7 |
8 #include <time.h> | 8 #include <time.h> |
9 | 9 |
10 #include "talk/base/basictypes.h" | 10 #include "talk/base/basictypes.h" |
11 | 11 |
12 typedef uint64 time64; | 12 typedef uint64 time64; |
13 | 13 |
14 #define kMicrosecsTo100ns (static_cast<time64>(10)) | 14 #define kMicrosecsTo100ns (static_cast<time64>(10)) |
15 #define kMillisecsTo100ns (static_cast<time64>(10000)) | 15 #define kMillisecsTo100ns (static_cast<time64>(10000)) |
16 #define kSecsTo100ns (1000 * kMillisecsTo100ns) | 16 #define kSecsTo100ns (1000 * kMillisecsTo100ns) |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 // Convert from time64 to struct tm. | 49 // Convert from time64 to struct tm. |
50 bool Time64ToTm(time64 t, struct tm* tm); | 50 bool Time64ToTm(time64 t, struct tm* tm); |
51 | 51 |
52 // Returns the local time as a string suitable for logging. | 52 // Returns the local time as a string suitable for logging. |
53 // Note: This is *not* threadsafe, so only call it from the main thread. | 53 // Note: This is *not* threadsafe, so only call it from the main thread. |
54 char* GetLocalTimeAsString(); | 54 char* GetLocalTimeAsString(); |
55 | 55 |
56 } // namespace notifier | 56 } // namespace notifier |
57 | 57 |
58 #endif // CHROME_BROWSER_SYNC_NOTIFIER_BASE_TIME_H_ | 58 #endif // CHROME_COMMON_NET_NOTIFIER_BASE_TIME_H_ |
OLD | NEW |