test_doc  0.1
 全部  文件 函数 变量 宏定义 
config.cpp
浏览该文件的文档.
1 /*
2  * config.cpp
3  *
4  * Created on: 2011-2-20
5  * Author: fasiondog
6  */
7 
8 #include "config.h"
9 #include <iostream>
10 #include <boost/filesystem.hpp>
11 
12 using namespace boost::filesystem;
13 
15  start_time = boost::chrono::system_clock::now();
16 
17  path current = current_path();
18  if ( current.stem() == path("test") ) {
19  current /= path("data");
20  } else {
21  current /= "test//data";
22  }
23 
24 #if defined(BOOST_WINDOWS)
25  hikyuu_init(current.string() + "/hikyuu_win.ini");
26 #else
27  hikyuu_init(current.string() + "/hikyuu_linux.ini");
28 #endif
29 }
30 
32  boost::chrono::duration<double> sec = boost::chrono::system_clock::now() - start_time;
33  std::cout << "All test spend time: " << sec.count() << "s" << std::endl;
34 }
35