Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
c6dded1e
Commit
c6dded1e
authored
Jun 29, 2016
by
Quentin Khan
Browse files
FAlgorithmTimers: catch exception in getTime when timer has not been set
parent
80a169d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/Utils/FAlgorithmTimers.hpp
View file @
c6dded1e
...
...
@@ -56,8 +56,13 @@ public:
/// Elapsed time between last FTic::tic() and FTic::tac() for given timer.
double
getTime
(
std
::
string
TimerName
)
const
{
//assert to verify size
return
Timers
.
at
(
TimerName
).
elapsed
();
double
res
=
0
;
try
{
res
=
Timers
.
at
(
TimerName
).
elapsed
();
}
catch
(
std
::
out_of_range
)
{
res
=
0
;
}
return
res
;
}
/// Cumulated time between all FTic::tic() and FTic::tac() for given timer.
...
...
Write
Preview
Markdown
is supported
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