c++ boost--------------boost::progress_timer小试。
//--------------------------------------------------------------------------- #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小试。的更多相关文章
- boost boost::asio::read socket.read_some 区别
boost boost::asio::read 尝试读一定数量的字节,直到读到为止,或者出错 socket.read_some 读一下socket,读到多少算多少 带async的类似
- [Boost]boost的时间和日期处理-(1)日期的操作
<开篇> Boost.DateTime库提供了时间日期相关的计算.格式化.转换.输入输出等等功能,为C++的编程提供了便利.不过它有如下特点: 1. Boost.DateTime 只支持1 ...
- [Boost]boost的时间和日期处理-(2)时间的操作
<开篇> 本篇紧接着boost上篇叙述Boost::DateTime的时间处理.在C++中,常见的时间有time_t, FILETIME和tm,而boost中用ptime. 构造ptime ...
- C++ 系列:编译 boost
Copyright © 1900-2016, NORYES, All Rights Reserved. http://www.cnblogs.com/noryes/ 欢迎转载,请保留此版权声明. -- ...
- boost和C++11中的sleep
boost boost线程中表示睡眠的函数有sleep和sleep_for sleep 例如: boost::this_thread::sleep(boost::posix_time::seconds ...
- clang 搭建和编译boost 和zero ICE库 (Ubuntu10 64)
相关介绍资料如下: Boost编译http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/downlo ...
- linux下编译安装boost库
linux下编译安装boost库 linux下编译安装boost库 1.下载并解压boost 1.58 源代码 下载 解压 2.运行bootstrap.sh 3.使用b2进行构建 构建成功的提示 4. ...
- boost 1.56.0 编译及使用
boost的编译和使用,经过搜集资料和总结,记录成文.感谢文后所列参考资料的作者. 1 下载 地址:http://sourceforge.net/projects/boost/files/boost/ ...
- boost 1.57.0安装
一. PC编译安装boost boost是C++的准标准库,其有两种安装方法. 1. ubuntu下,通过sudo apt-get install libboost-all-dev. 2. 通过源码包 ...
随机推荐
- dede图片横向滚动
<div id=demo style="overflow:hidden; width:960px;" > <table border=0 align=" ...
- semanage: 未找到命令
[root@hn ~]# semanage port -l|grep ssh-bash: semanage: 未找到命令 yum -y install policycoreutils-python
- 关于htmlspecialchars实体字符转码的问题
php对post过来的数据进行实体字符转码,我的页面编码是gb2312,刚开始是这样: $post = htmlspecialchars ( $post); 取到的$post值为空,但是有时候是好的( ...
- c# 贪吃蛇源码
using UnityEngine; using System.Collections;using System.Diagnostics;using UnityEngine.SceneManageme ...
- android实现 服务器功能
package com.weijia.tests; import java.io.IOException; import java.net.InetSocketAddress; import java ...
- Objective-C: 字符串NSString与NSMutableString
字符串算是OC中非常重要和常用的一部分内容,OC中的字符串与我之前在学习C,C++,Java中的字符串有一定的不同,它非常类似于C++中容器的概念,但用法却与之还是有很大的不同,也许是因为OC的语法就 ...
- 20145305解佳玲 《Java程序设计》第1周学习总结
教材学习内容总结 第一章 Java平台概论 1.先了解了JAVA的历史 2.Java三大平台:Java SE.Java EE与Java ME 3.Java SE的四个组成部分:JVM.JRE.JDK与 ...
- ramBufferSizeMB
索引算法确定 的情况下,影响Lucene索引速度的因素 MaxBufferedDocs这个参数默认是disabled的,因为Lucene中还用另外一个参数(RAMBufferSizeMB)控制这个bu ...
- [ZOJ 1006] Do the Untwist (模拟实现解密)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=6 题目大意:给你加密方式,请你求出解密. 直接逆运算搞,用到同余定理 ...
- java环境变量完整版
jdk默认安装 Key: JAVA_HOME(新建) Value: C:\Program Files\Java\jdk1.8.0_25 Key: Path(编辑) Value: %JAVA_HOME% ...