//---------------------------------------------------------------------------

 #include <vcl.h>
#pragma hdrstop #include "Unit4.h"
#include <boost/progress.hpp>
#include <sstream>
using namespace std;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm4 *Form4;
//---------------------------------------------------------------------------
__fastcall TForm4::TForm4(TComponent* Owner)
: TForm(Owner)
{
} void test_timer(std::stringstream& ss)
{
ss.clear();
boost::progress_timer t(ss); {
//boost::progress_timer t1(ss);
Sleep();
//Form4->Memo1->Lines->Add((AnsiString)"1--"+ss.str().c_str());
} {
//boost::progress_timer t2(ss);
//boost::progress_timer t(ss);
Sleep();
//Form4->Memo1->Lines->Add((AnsiString)"2--"+ss.str().c_str());
} {
//boost::progress_timer t3(ss);
//boost::progress_timer t(ss);
Sleep();
//Form4->Memo1->Lines->Add((AnsiString)"3--"+ss.str().c_str());
}
} //---------------------------------------------------------------------------
void __fastcall TForm4::Button1Click(TObject *Sender)
{
std::stringstream ss;
test_timer(ss);
this->Memo1->Lines->Add(ss.str().c_str());
}
//---------------------------------------------------------------------------

c++ boost--------------boost::progress_timer小试。的更多相关文章

  1. boost boost::asio::read socket.read_some 区别

    boost boost::asio::read 尝试读一定数量的字节,直到读到为止,或者出错 socket.read_some 读一下socket,读到多少算多少 带async的类似

  2. [Boost]boost的时间和日期处理-(1)日期的操作

    <开篇> Boost.DateTime库提供了时间日期相关的计算.格式化.转换.输入输出等等功能,为C++的编程提供了便利.不过它有如下特点: 1. Boost.DateTime 只支持1 ...

  3. [Boost]boost的时间和日期处理-(2)时间的操作

    <开篇> 本篇紧接着boost上篇叙述Boost::DateTime的时间处理.在C++中,常见的时间有time_t, FILETIME和tm,而boost中用ptime. 构造ptime ...

  4. C++ 系列:编译 boost

    Copyright © 1900-2016, NORYES, All Rights Reserved. http://www.cnblogs.com/noryes/ 欢迎转载,请保留此版权声明. -- ...

  5. boost和C++11中的sleep

    boost boost线程中表示睡眠的函数有sleep和sleep_for sleep 例如: boost::this_thread::sleep(boost::posix_time::seconds ...

  6. clang 搭建和编译boost 和zero ICE库 (Ubuntu10 64)

    相关介绍资料如下: Boost编译http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/downlo ...

  7. linux下编译安装boost库

    linux下编译安装boost库 linux下编译安装boost库 1.下载并解压boost 1.58 源代码 下载 解压 2.运行bootstrap.sh 3.使用b2进行构建 构建成功的提示 4. ...

  8. boost 1.56.0 编译及使用

    boost的编译和使用,经过搜集资料和总结,记录成文.感谢文后所列参考资料的作者. 1 下载 地址:http://sourceforge.net/projects/boost/files/boost/ ...

  9. boost 1.57.0安装

    一. PC编译安装boost boost是C++的准标准库,其有两种安装方法. 1. ubuntu下,通过sudo apt-get install libboost-all-dev. 2. 通过源码包 ...

随机推荐

  1. API 双方认证探讨

    开放 api 已是大势所趋.而 api 这种东西有个特点就是覆水难收.一旦公开出去了,被大量用户使用,一旦修改,就会让广大用户都掉坑里.所以,api 在设计之初就要尽量考虑周全,并预留扩展可能. 目前 ...

  2. Centos 7 修改SSH端口号

    注意!这里的Centos版本是7   step1 修改/etc/ssh/sshd_config vi /etc/ssh/sshd_config #Port 22         //这行去掉#号 Po ...

  3. bug_ _java.lang.IllegalArgumentException: View not attached to window manager

    ============= 1   view not attached to window manager 转自:http://hi.baidu.com/spare_h/blog/item/7fa3e ...

  4. HDFS的运行原理(转)

    简介 HDFS(Hadoop Distributed File System )Hadoop分布式文件系统.是根据google发表的论文翻版的.论文为GFS(Google File System)Go ...

  5. 你应该知道的jQuery技巧

    帮助提高你jQuery应用的简单小技巧. 回到顶部按钮 图片预加载 判断图片是否加载完 自动修补破损图像 Hover切换class类 禁用输入 停止正在加载的链接 toggle fade/slide ...

  6. 在ubuntu下安装phpmyadmin 出现404错误

    在ubuntu下安转phpmyadmin 只要一条命令: Sudo apt-get install phpmyadmin 安装完成后,在浏览器里输入http://localhost/phpmyadmi ...

  7. maven项目导入报错

    极大可能是仓库设置问题

  8. nyoj 86 找球号(一)

    点击打开链接 找球号(一) 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述 在某一国度里流行着一种游戏.游戏规则为:在一堆球中,每个球上都有一个整数编号i(0<=i ...

  9. nyoj 68 三点顺序

    点击打开链接 三点顺序 时间限制:1000 ms  |  内存限制:65535 KB 难度:3 描述 现在给你不共线的三个点A,B,C的坐标,它们一定能组成一个三角形,现在让你判断A,B,C是顺时针给 ...

  10. HTTP 和 HTTPS 协议

    HTTP协议是什么? 简单来说,就是一个基于应用层的通信规范:双方要进行通信,大家都要遵守一个规范,这个规范就是HTTP协议. HTTP协议能做什么? 很多人首先一定会想到:浏览网页.没错,浏览网页是 ...