我需要纳秒分辨率,我在文档中读到: http://www.boost.org/doc/libs/1_53_0/doc/html/date_time/details.html#date_time.buildinfo
我必须再次构建 boost
BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
已定义,但我不知道我应该在哪里做,或者语法应该如何。我猜它应该在果酱文件中。我有 boost-build.jam
、boostcpp.jam
、project-config.jam
。但是不知道我应该在其中一个文件中写些什么来实现它。
最佳答案
根据您链接的文档(强调我的):
To use the alternate resolution (96 bit nanosecond) the variable BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG must be defined in the library users project files (ie Makefile, Jamfile, etc).
也就是说,如果在编译项目时定义了上述宏就足够了。你不需要重建 boost 本身。
关于c++ - 使用纳秒与 boost :posix_time,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37654384/