15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_UTILITIES_TICKS_INLINE_HPP
26 #define SHARE_VM_UTILITIES_TICKS_INLINE_HPP
27
28 #include "utilities/ticks.hpp"
29
30 inline Tickspan operator+(Tickspan lhs, const Tickspan& rhs) {
31 lhs += rhs;
32 return lhs;
33 }
34
35 inline bool operator==(const Tickspan& lhs, const Tickspan& rhs) {
36 return lhs.value() == rhs.value();
37 }
38
39 inline bool operator!=(const Tickspan& lhs, const Tickspan& rhs) {
40 return !operator==(lhs,rhs);
41 }
42
43 inline bool operator<(const Tickspan& lhs, const Tickspan& rhs) {
44 return lhs.value() < rhs.value();
45 }
46
47 inline bool operator>(const Tickspan& lhs, const Tickspan& rhs) {
48 return operator<(rhs,lhs);
49 }
50
51 inline bool operator<=(const Tickspan& lhs, const Tickspan& rhs) {
52 return !operator>(lhs,rhs);
53 }
54
|
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_UTILITIES_TICKS_INLINE_HPP
26 #define SHARE_VM_UTILITIES_TICKS_INLINE_HPP
27
28 #include "utilities/ticks.hpp"
29
30 inline Tickspan operator+(Tickspan lhs, const Tickspan& rhs) {
31 lhs += rhs;
32 return lhs;
33 }
34
35 inline Tickspan operator-(Tickspan lhs, const Tickspan& rhs) {
36 lhs -= rhs;
37 return lhs;
38 }
39
40 inline bool operator==(const Tickspan& lhs, const Tickspan& rhs) {
41 return lhs.value() == rhs.value();
42 }
43
44 inline bool operator!=(const Tickspan& lhs, const Tickspan& rhs) {
45 return !operator==(lhs,rhs);
46 }
47
48 inline bool operator<(const Tickspan& lhs, const Tickspan& rhs) {
49 return lhs.value() < rhs.value();
50 }
51
52 inline bool operator>(const Tickspan& lhs, const Tickspan& rhs) {
53 return operator<(rhs,lhs);
54 }
55
56 inline bool operator<=(const Tickspan& lhs, const Tickspan& rhs) {
57 return !operator>(lhs,rhs);
58 }
59
|