Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
7f1ed1b2
Commit
7f1ed1b2
authored
Aug 12, 2021
by
LEFEBVREJP email
Browse files
Fixed timer.wall_clock and timer.sum_wall_clock methods.
parent
dc007502
Pipeline
#158998
passed with stages
in 17 minutes and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
radixbug/bug.hh
View file @
7f1ed1b2
...
...
@@ -247,9 +247,10 @@ class Timer
double
wall_clock
()
{
radix_require
(
!
mRunning
);
auto
nanoseconds
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
nanoseconds
>
(
mEnd
-
mStart
);
// 1e9 nanoseconds in a second
using
seconds
=
std
::
chrono
::
duration
<
double
,
std
::
ratio
<
1000
,
1
>>
;
return
seconds
(
mEnd
-
mStart
).
count
();
return
nanoseconds
.
count
()
/
1e9
;
}
/**
...
...
@@ -261,8 +262,7 @@ class Timer
double
sum_wall_clock
()
{
// 1e9 nanoseconds in a second
using
seconds
=
std
::
chrono
::
duration
<
double
,
std
::
ratio
<
1000
,
1
>>
;
return
seconds
(
mDuration
).
count
();
return
mDuration
.
count
()
/
1e9
;
}
/**
...
...
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