Discussion:
[asio-users] MSVC++ 13 broken std::chrono impl
Adam Crain
2015-03-13 18:08:30 UTC
Permalink
Hi All,

I'm using the ASIO_STANDALONE w/ C++11 in the library I support.

One of my users recently noticing that timers were going haywire on Windows
when the system clock changed. I was very surprised because we use the
following internally:

asio::basic_waitable_timer< std::chrono::steady_clock >

Apparently, Microsoft has a crappy implementation of steady clock in MSVC
13:

http://stackoverflow.com/questions/11488075/vs11-is-steady-clock-steady

I have been unable to find definitive info for when/if this has been fixed
in a CTP or patch. Has anyone else run into this? Do you have a workaround
that doesn't involve falling back on boost::chrono::steady_clock?

-Adam
--
J Adam Crain - Partner

<http://www.automatak.com>

PGP 4096R/E2984A0C
<https://automatak.net/wordpress/wp-content/uploads/2014/10/jadamcrain.asc>
2013-05-03
Niall Douglas
2015-03-13 19:26:22 UTC
Permalink
Post by Adam Crain
One of my users recently noticing that timers were going haywire on Windows
when the system clock changed. I was very surprised because we use the
asio::basic_waitable_timer< std::chrono::steady_clock >
Apparently, Microsoft has a crappy implementation of steady clock in MSVC
http://stackoverflow.com/questions/11488075/vs11-is-steady-clock-steady
I have been unable to find definitive info for when/if this has been fixed
in a CTP or patch. Has anyone else run into this? Do you have a workaround
that doesn't involve falling back on boost::chrono::steady_clock?
Dinkumware STL timers are optimal and correct as of VS2015. It took a
while for Stephan to get round to fixing them, he had other
priorities.

Niall
--
ned Productions Limited Consulting
http://www.nedproductions.biz/
http://ie.linkedin.com/in/nialldouglas/
Adam Crain
2015-03-13 19:57:28 UTC
Permalink
Thanks Niall.

I'll tell my MSVC users to either use 2015 or patch it with boost::chrono
for the time being.
Post by Adam Crain
Post by Adam Crain
One of my users recently noticing that timers were going haywire on
Windows
Post by Adam Crain
when the system clock changed. I was very surprised because we use the
asio::basic_waitable_timer< std::chrono::steady_clock >
Apparently, Microsoft has a crappy implementation of steady clock in MSVC
http://stackoverflow.com/questions/11488075/vs11-is-steady-clock-steady
I have been unable to find definitive info for when/if this has been
fixed
Post by Adam Crain
in a CTP or patch. Has anyone else run into this? Do you have a
workaround
Post by Adam Crain
that doesn't involve falling back on boost::chrono::steady_clock?
Dinkumware STL timers are optimal and correct as of VS2015. It took a
while for Stephan to get round to fixing them, he had other
priorities.
Niall
--
ned Productions Limited Consulting
http://www.nedproductions.biz/
http://ie.linkedin.com/in/nialldouglas/
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website,
sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for
all
things parallel software development, from weekly thought leadership blogs
to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
asio-users mailing list
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
--
J Adam Crain - Partner

<http://www.automatak.com>

PGP 4096R/E2984A0C
<https://automatak.net/wordpress/wp-content/uploads/2014/10/jadamcrain.asc>
2013-05-03
Loading...