You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm slightly lost with chrono, duration and ratio.
Just an idea to do a Time sum.
std::chrono::time_pointstd::chrono::steady_clock a, b, c
for(...) {
a = std::chrono::steady_clock::now();
...
b = std::chrono::steady_clock::now();
c += b - a ???? doesn't compile
auto c { b-a} .... that's ok but it's not the purpose (it's not the sum)
}.
Pretty hard to be familiar with these "intricate class"... just for that case i have rewritten a single tickount class... but there is a usage to know ... Any ideas ???
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm slightly lost with chrono, duration and ratio.
Just an idea to do a Time sum.
std::chrono::time_pointstd::chrono::steady_clock a, b, c
for(...) {
a = std::chrono::steady_clock::now();
...
b = std::chrono::steady_clock::now();
c += b - a ???? doesn't compile
auto c { b-a} .... that's ok but it's not the purpose (it's not the sum)
}.
Pretty hard to be familiar with these "intricate class"... just for that case i have rewritten a single tickount class... but there is a usage to know ... Any ideas ???
Beta Was this translation helpful? Give feedback.
All reactions