GridGain C++
time.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 GridGain Systems, Inc. and Contributors.
3  *
4  * Licensed under the GridGain Community Edition License (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  * https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license
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 
22 #ifndef _IGNITE_TIME
23 #define _IGNITE_TIME
24 
25 #include <stdint.h>
26 
27 #include <ignite/common/common.h>
28 
29 namespace ignite
30 {
34  class IGNITE_IMPORT_EXPORT Time
35  {
36  public:
40  Time();
41 
47  Time(const Time& another);
48 
54  Time(int64_t ms);
55 
62  Time& operator=(const Time& another);
63 
69  int64_t GetMilliseconds() const;
70 
76  int64_t GetSeconds() const;
77 
85  friend bool IGNITE_IMPORT_EXPORT operator==(const Time& val1, const Time& val2);
86 
94  friend bool IGNITE_IMPORT_EXPORT operator!=(const Time& val1, const Time& val2);
95 
103  friend bool IGNITE_IMPORT_EXPORT operator<(const Time& val1, const Time& val2);
104 
112  friend bool IGNITE_IMPORT_EXPORT operator<=(const Time& val1, const Time& val2);
113 
121  friend bool IGNITE_IMPORT_EXPORT operator>(const Time& val1, const Time& val2);
122 
130  friend bool IGNITE_IMPORT_EXPORT operator>=(const Time& val1, const Time& val2);
131  private:
133  int64_t milliseconds;
134  };
135 }
136 
137 #endif //_IGNITE_TIME
ignite
Ignite API.
Definition: cache.h:47
ignite::Time
Time type.
Definition: time.h:34
ignite::operator<
bool operator<(const Date &val1, const Date &val2)
Definition: date.cpp:63
ignite::operator>=
bool operator>=(const Date &val1, const Date &val2)
Definition: date.cpp:78
ignite::operator<=
bool operator<=(const Date &val1, const Date &val2)
Definition: date.cpp:68
ignite::operator>
bool operator>(const Date &val1, const Date &val2)
Definition: date.cpp:73
ignite::operator!=
bool operator!=(const Date &val1, const Date &val2)
Definition: date.cpp:58
ignite::operator==
bool operator==(const Date &val1, const Date &val2)
Definition: date.cpp:53