Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Hadrien Benjamin Grasland
Gaudi
Commits
e9811ee3
Commit
e9811ee3
authored
Feb 06, 2019
by
Niklas Stefan Nolte
🔥
Committed by
Marco Clemencic
Feb 06, 2019
Browse files
update chronoentity (see #60)
parent
875efffa
Changes
2
Hide whitespace changes
Inline
Side-by-side
GaudiKernel/GaudiKernel/ChronoEntity.h
View file @
e9811ee3
...
...
@@ -86,7 +86,10 @@ public:
public:
// ==========================================================================
/// comparison operator
bool
operator
<
(
const
ChronoEntity
&
entity
)
const
;
friend
bool
operator
<
(
ChronoEntity
const
&
lhs
,
ChronoEntity
const
&
rhs
)
{
return
std
::
make_tuple
(
lhs
.
totalTime
(),
lhs
.
m_user
,
lhs
.
m_kernel
,
lhs
.
m_elapsed
)
<
std
::
make_tuple
(
rhs
.
totalTime
(),
rhs
.
m_user
,
rhs
.
m_kernel
,
rhs
.
m_elapsed
);
}
// ==========================================================================
/// Compound assignment operator
ChronoEntity
&
operator
+=
(
const
ChronoEntity
&
entity
);
...
...
GaudiKernel/src/Lib/ChronoEntity.cpp
View file @
e9811ee3
...
...
@@ -134,25 +134,6 @@ std::string ChronoEntity::format( const double total, const double minimal, cons
return
fmt
.
str
();
}
// ============================================================================
// comparison operator
// ============================================================================
bool
ChronoEntity
::
operator
<
(
const
ChronoEntity
&
e
)
const
{
return
(
&
e
==
this
)
?
false
:
(
totalTime
()
<
e
.
totalTime
()
)
?
true
:
(
totalTime
()
>
e
.
totalTime
()
)
?
false
:
(
m_user
<
e
.
m_user
)
?
true
:
(
e
.
m_user
<
m_user
)
?
false
:
(
m_kernel
<
e
.
m_kernel
)
?
true
:
(
e
.
m_kernel
<
m_kernel
)
?
false
:
(
m_elapsed
<
e
.
m_elapsed
)
?
true
:
false
;
}
// ============================================================================
// compound assignment operator
// ============================================================================
ChronoEntity
&
ChronoEntity
::
operator
+=
(
const
ChronoEntity
&
e
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment