场景
- C++11开始提供了一个 实用时间库,相比C的time.h强多了,最明显的是可以精确到纳秒.
- vs2010还不支持这个库,所以比较可惜,对于新开发的项目,建议用2015可以使用最新特性.
- 一般用这个库来转换时间或计算函数执行时间或者CPU指令周期.
例子
#include <iostream>
#include <algorithm>
#include <sstream>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <assert.h>
#include <ctype.h>