SlideShare uma empresa Scribd logo
1 de 42
Baixar para ler offline
Boost.Timer
日本語
Boost.Timer?
Boost.Chrono?
Boost.Chrono?
NO
Boost.Timer
boost::progress_display
Why?
How to Use
const int MAX = 100000;
progress_display show_progress(MAX);
for(int i=0; i<MAX; i++) {
DoSomething(i);
++show_progress;
}
const int MAX = 100000;
progress_display show_progress(MAX);
for(int i=0; i<MAX; i++) {
DoSomething(i);
++show_progress;
}
Beautiful Interface!
const int MAX =

0;

progress_display show_progress(MAX);
cout << show_progress.expected_count();
const int MAX =

0;

progress_display show_progress(MAX);
cout << show_progress.expected_count();

1
Interface
progress_display(
unsigned long expected_count,
std::ostream& os,
const std::string & s1 = "¥n",
const std::string & s2 = "",
const std::string & s3 = "");
progress_display(
unsigned long expected_count,
std::ostream& os,
const std::string & s1 = "¥n",
const std::string & s2 = "",
const std::string & s3 = "");
progress_display(
unsigned long expected_count,
std::ostream& os = std::cout,
const std::string & s1 = "¥n",
const std::string & s2 = "",
const std::string & s3 = "");
progress_display(
unsigned long expected_count,
std::ostream& os = std::cout,
const std::string & s1 = "¥n",
const std::string & s2 = "",
const std::string & s3 = "");

Customize?
progress_display(
unsigned long expected_count,
std::ostream& os = std::cout,
const std::string & s1 = "¥n",
const std::string & s2 = "",
const std::string & s3 = "");

Customize?
progress_display(
unsigned long expected_count,
std::ostream& os = std::cout,
const std::string & s1 = "¥n",
const std::string & s2 = "",
const std::string & s3 = "");

Customize?
const int MAX = 100000;
progress_display show_progress(MAX,
std::cout,
"hoge",
"fuga",
"hagebs");
for(int i=0; i<MAX; i++) {
DoSomething(i);
++show_progress;
}
const int MAX = 100000;
progress_display show_progress(MAX,
std::cout,
"hoge",
"fuga",
"hagebs");
for(int i=0; i<MAX; i++) {
DoSomething(i);
++show_progress;
}
const int MAX = 100000;
progress_display show_progress(MAX,
std::cout,
"hoge",
"fuga",
"hagebs");
for(int i=0; i<MAX; i++) {
DoSomething(i);
++show_progress;
}
const int MAX = 100000;
progress_display show_progress(MAX,
std::cout,
"hoge",
"fuga",
"hagebs");
for(int i=0; i<MAX; i++) {
DoSomething(i);
++show_progress;
}
void restart( unsigned long expected_count );
// Postconditions: count()==0
//

expected_count()==expected_count
void restart( unsigned long expected_count );
// Postconditions: count()==0
//

expected_count()==expected_count
void restart( unsigned long expected_count );
// Postconditions: count()==0
//

expected_count()==expected_count

const int MAX = 0;
progress_display show_progress(MAX);
cout << show_progress.expected_count();

1
unsigned long operator+=(unsigned long);
unsigned long operator++();
unsigned long count() const;
unsigned long expected_count() const;
Extra
const int MAX = 100000;
progress_display show_progress(MAX);
for(int i=0; i<MAX; i++) {
DoSomething(i);
++show_progress;
}
const int MAX = 100000;
progress_display show_progress(MAX);
for(int i=0; i<MAX+MAX; i++) {
DoSomething(i);
++show_progress;
}
const int MAX = 100000;
progress_display show_progress(MAX);
for(int i=0; i<MAX+MAX; i++) {
DoSomething(i);
++show_progress;
}
const int MAX = 100000;
progress_display show_progress(MAX);
for(int i=0; i<MAX+MAX; i++) {
DoSomething(i);
++show_progress;
}
const int MAX = 100000;
progress_display show_progress(MAX);
for(int i=0; i<MAX*MAX; i++) {
DoSomething(i);
++show_progress;
}
const int MAX = 100000;
progress_display show_progress(MAX);
for(int i=0; i<MAX*MAX; i++) {
DoSomething(i);
++show_progress;
}
Let's Enjoy
progress_display!
¥e

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Include
IncludeInclude
Include
 
C questions
C questionsC questions
C questions
 
Solutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structuresSolutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structures
 
Ooprc3c
Ooprc3cOoprc3c
Ooprc3c
 
Ds
DsDs
Ds
 
A Shiny Example-- R
A Shiny Example-- RA Shiny Example-- R
A Shiny Example-- R
 
Data Structure in C Programming Language
Data Structure in C Programming LanguageData Structure in C Programming Language
Data Structure in C Programming Language
 
PROGRAM FOR INSERTION SORTING IN ARRAY
PROGRAM FOR INSERTION SORTING IN ARRAY PROGRAM FOR INSERTION SORTING IN ARRAY
PROGRAM FOR INSERTION SORTING IN ARRAY
 
C programs
C programsC programs
C programs
 
Program to sort the n names in an alphabetical order
Program to sort the n names in an alphabetical orderProgram to sort the n names in an alphabetical order
Program to sort the n names in an alphabetical order
 
Cpp c++ 2
Cpp c++ 2Cpp c++ 2
Cpp c++ 2
 
week-21x
week-21xweek-21x
week-21x
 
Implementing string
Implementing stringImplementing string
Implementing string
 
DAA Lab File C Programs
DAA Lab File C ProgramsDAA Lab File C Programs
DAA Lab File C Programs
 
Os lab file c programs
Os lab file c programsOs lab file c programs
Os lab file c programs
 
ADA FILE
ADA FILEADA FILE
ADA FILE
 
design and analysis of algorithm Lab files
design and analysis of algorithm Lab filesdesign and analysis of algorithm Lab files
design and analysis of algorithm Lab files
 
SaraPIC
SaraPICSaraPIC
SaraPIC
 
VTU Network lab programs
VTU Network lab   programsVTU Network lab   programs
VTU Network lab programs
 
Interview questions
Interview questionsInterview questions
Interview questions
 

Destaque (7)

C++14 solve explicit_default_constructor
C++14 solve explicit_default_constructorC++14 solve explicit_default_constructor
C++14 solve explicit_default_constructor
 
Glfw3,OpenGL,GUI
Glfw3,OpenGL,GUI Glfw3,OpenGL,GUI
Glfw3,OpenGL,GUI
 
Introduction to boost test
Introduction to boost testIntroduction to boost test
Introduction to boost test
 
Pub/Sub model, msm, and asio
Pub/Sub model, msm, and asioPub/Sub model, msm, and asio
Pub/Sub model, msm, and asio
 
C++14 enum hash
C++14 enum hashC++14 enum hash
C++14 enum hash
 
Boost sg msgpack
Boost sg msgpackBoost sg msgpack
Boost sg msgpack
 
C++コミュニティーの中心でC++をDISる
C++コミュニティーの中心でC++をDISるC++コミュニティーの中心でC++をDISる
C++コミュニティーの中心でC++をDISる
 

Semelhante a Boost.Timer

How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
Bitla Software
 
Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! 
aleks-f
 
20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介
Justin Lee
 
Java.script
Java.scriptJava.script
Java.script
g Nama
 

Semelhante a Boost.Timer (20)

JavaScript Refactoring
JavaScript RefactoringJavaScript Refactoring
JavaScript Refactoring
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
 
Rich and Snappy Apps (No Scaling Required)
Rich and Snappy Apps (No Scaling Required)Rich and Snappy Apps (No Scaling Required)
Rich and Snappy Apps (No Scaling Required)
 
Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! 
 
Cs pritical file
Cs pritical fileCs pritical file
Cs pritical file
 
Cpp programs
Cpp programsCpp programs
Cpp programs
 
20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介
 
C++ Programming - 1st Study
C++ Programming - 1st StudyC++ Programming - 1st Study
C++ Programming - 1st Study
 
Алексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhereАлексей Кутумов, Coroutines everywhere
Алексей Кутумов, Coroutines everywhere
 
Day 5
Day 5Day 5
Day 5
 
Managing console
Managing consoleManaging console
Managing console
 
Statistics.cpp
Statistics.cppStatistics.cpp
Statistics.cpp
 
CPP Homework Help
CPP Homework HelpCPP Homework Help
CPP Homework Help
 
TDD per Webapps
TDD per WebappsTDD per Webapps
TDD per Webapps
 
Pnno
PnnoPnno
Pnno
 
Railwaynew
RailwaynewRailwaynew
Railwaynew
 
Embracing the-power-of-refactor
Embracing the-power-of-refactorEmbracing the-power-of-refactor
Embracing the-power-of-refactor
 
C++ file
C++ fileC++ file
C++ file
 
Java.script
Java.scriptJava.script
Java.script
 
Html
HtmlHtml
Html
 

Último

Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
dlhescort
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
Abortion pills in Kuwait Cytotec pills in Kuwait
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Sheetaleventcompany
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
daisycvs
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
lizamodels9
 

Último (20)

Falcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in indiaFalcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in india
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 MonthsSEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Business Model Canvas (BMC)- A new venture concept
Business Model Canvas (BMC)-  A new venture conceptBusiness Model Canvas (BMC)-  A new venture concept
Business Model Canvas (BMC)- A new venture concept
 
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
Call Girls Zirakpur👧 Book Now📱7837612180 📞👉Call Girl Service In Zirakpur No A...
 
PHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation FinalPHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation Final
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 

Boost.Timer