MongoDB C++ Driver  legacy-1.1.2
timestamp.h
1 /*
2  * Copyright 2014 MongoDB Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include "mongo/platform/cstdint.h"
20 
21 namespace mongo {
22 
23 class Timestamp_t {
24 public:
25  Timestamp_t() : _seconds(), _increment() {}
26 
27  Timestamp_t(const uint32_t seconds, const uint32_t increment)
28  : _seconds(seconds), _increment(increment) {}
29 
30  uint32_t seconds() const {
31  return _seconds;
32  }
33  uint32_t increment() const {
34  return _increment;
35  }
36 
37 private:
38  const uint32_t _seconds;
39  const uint32_t _increment;
40 };
41 
42 } // namespace mongo
Definition: timestamp.h:23
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20