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

 #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. HDU Count the string+Next数组测试函数

    链接:http://www.cnblogs.com/jackge/archive/2013/04/20/3032942.html 题意:给定一字符串,求它所有的前缀出现的次数的和.这题很纠结,一开始不 ...

  2. js复习(二)

    一.window.document对象(一)找元素 docunment.getElementById("id"):根据id找,最多找一个: docunment.getElement ...

  3. Axis2/c 知识点

    官网文档:  http://axis.apache.org/axis2/c/core/docs/axis2c_manual.html 从文档中可以总结出: 1. Axis2/C是一个用C语言实现的We ...

  4. 客户端使用自定义代理类访问WCF服务 z

    通常在客户端访问WCF服务时,都需要添加服务引用,然后在客户端app.config或 web.config文件中产生WCF服务的客户端配置信息.若是每添加一个服务都是这样做,这样势必会将比较麻烦,能否 ...

  5. java 、android 知识图谱

    java知识图谱: android知识图谱: 照此图练习,神功自成.....

  6. Dubbo 通过Spring 配置具体启动服务

    dubbo 服务的启动加载过程,请先看 : http://www.cnblogs.com/ghj1976/p/5316126.html  以 dubbo-demo-provider-2.5.4-SNA ...

  7. linux nandflash驱动之MTD层

    MTD,Memory Technology Device即内存技术设备,在Linux内核中,引入MTD层为NOR FLASH和NAND FLASH设备提供统一接口.MTD将文件系统与底层FLASH存储 ...

  8. PYTHON ASYNCIO: FUTURE, TASK AND THE EVENT LOOP

    from :http://masnun.com/2015/11/20/python-asyncio-future-task-and-the-event-loop.html Event Loop On ...

  9. [datatable]C# DataTable 如何排序

    DataTable dt = new DataTable(); dt.Columns.Add("ProductID", typeof(string)); dt.Columns.Ad ...

  10. SAP

    http://www.itpub.net/thread-1328005-1-1.html http://blog.sina.com.cn/s/blog_4b75f26e0100b52a.html SA ...