There is the entire <chrono> header in C++11. However, you might find it a bit intimidating.
What gets me is that it's giving you an error instead of a warning. That code is standard C++ and the last time I used visual studio (which I admit was years ago), it gave its "unsafe" warnings as just that, warnings. I know Visual Studio has a "warnings as errors" flag somewhere, and I can't help but wonder if it might be set.
You could get another compiler, of course, like Bourgond Aries suggested. I can't make any assertions as to whether the generated executables will be of a higher or lower quality than from Microsoft's compiler, but the differences shouldn't be glaringly large.