c++ - 使用纳秒与 boost :posix_time

标签 c++ boost time compilation posix

我需要纳秒分辨率,我在文档中读到: 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.jamboostcpp.jamproject-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/

相关文章:

c++ - GCC 相当于 MS/bigobj

date - 如何计算两个日期时间值之间的时差

c++ - Steam API 平均

c++ - 基于指针的查询

c++ - 从 std::vector 中过滤掉元素的有效方法

c++ - 如何判断 Boost 循环缓冲区的当前 'write position' 以允许访问先前存储的值

c++ - 是否可以使 QML ListView 循环?

c++ - 编译器未标记 HRESULT 的错误返回值

javascript - 如何给这个纪元添加一毫秒的时间?

php - PHP 中显示带有语言细节的日期的函数