Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: webrtc/base/timeutils.h

Issue 1468273004: Provide method for returning certificate expiration timestamp. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Windows fixes Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/sslstreamadapter_unittest.cc ('k') | webrtc/base/timeutils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2005 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2005 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_BASE_TIMEUTILS_H_ 11 #ifndef WEBRTC_BASE_TIMEUTILS_H_
12 #define WEBRTC_BASE_TIMEUTILS_H_ 12 #define WEBRTC_BASE_TIMEUTILS_H_
13 13
14 #include <ctime>
14 #include <time.h> 15 #include <time.h>
15 16
16 #include "webrtc/base/basictypes.h" 17 #include "webrtc/base/basictypes.h"
17 18
18 namespace rtc { 19 namespace rtc {
19 20
20 static const int64_t kNumMillisecsPerSec = INT64_C(1000); 21 static const int64_t kNumMillisecsPerSec = INT64_C(1000);
21 static const int64_t kNumMicrosecsPerSec = INT64_C(1000000); 22 static const int64_t kNumMicrosecsPerSec = INT64_C(1000000);
22 static const int64_t kNumNanosecsPerSec = INT64_C(1000000000); 23 static const int64_t kNumNanosecsPerSec = INT64_C(1000000000);
23 24
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 public: 87 public:
87 TimestampWrapAroundHandler(); 88 TimestampWrapAroundHandler();
88 89
89 int64_t Unwrap(uint32_t ts); 90 int64_t Unwrap(uint32_t ts);
90 91
91 private: 92 private:
92 uint32_t last_ts_; 93 uint32_t last_ts_;
93 int64_t num_wrap_; 94 int64_t num_wrap_;
94 }; 95 };
95 96
97 // Convert from std::tm, which is relative to 1900-01-01 00:00 to number of
98 // seconds from 1970-01-01 00:00 ("epoch"). Don't return time_t since that
99 // is still 32 bits on many systems.
100 int64_t TmToSeconds(const std::tm& tm);
101
96 } // namespace rtc 102 } // namespace rtc
97 103
98 #endif // WEBRTC_BASE_TIMEUTILS_H_ 104 #endif // WEBRTC_BASE_TIMEUTILS_H_
OLDNEW
« no previous file with comments | « webrtc/base/sslstreamadapter_unittest.cc ('k') | webrtc/base/timeutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698