fix typo in travis to actually build bt-get and bt-get2 examples. fix bt-get2 build

This commit is contained in:
arvidn 2016-03-30 02:31:37 -04:00
parent e9cd4f21c9
commit 238e7515ea
2 changed files with 4 additions and 4 deletions

View File

@ -93,7 +93,7 @@ script:
- cd ../examples
- bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset link=shared
- if [[ lang == "cpp11" ]]; then
- if [[ $lang == "cpp11" ]]; then
bjam --hash -j3 warnings-as-errors=on variant=$variant $toolset link=shared bt-get bt-get2;
fi
- cd ..

View File

@ -43,7 +43,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <libtorrent/torrent_status.hpp>
namespace lt = libtorrent;
using clock_t = std::chrono::monotonic_clock;
using clk = std::chrono::steady_clock;
// return the name of a torrent status enum
char const* state(lt::torrent_status::state_t s)
@ -75,7 +75,7 @@ int main(int argc, char const* argv[])
lt::session ses(pack);
lt::add_torrent_params atp;
std::chrono::time_point last_save_resume = clock_t::now();
clk::time_point last_save_resume = clk::now();
// load resume data from disk and pass it in as we add the magnet link
std::ifstream ifs(".resume_file", std::ios_base::binary);
@ -135,7 +135,7 @@ int main(int argc, char const* argv[])
ses.post_torrent_updates();
// save resume data once every 30 seconds
if (clock_t::now() - last_save_resume > seconds(30)) {
if (clk::now() - last_save_resume > std::chrono::seconds(30)) {
h.save_resume_data();
}
}