SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (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
 

Andere mochten auch (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る
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
allensay1
 
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
 

Kürzlich hochgeladen (20)

JAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR ESCORTS
JAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR  ESCORTSJAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR  ESCORTS
JAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR ESCORTS
 
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
 
Pre Engineered Building Manufacturers Hyderabad.pptx
Pre Engineered  Building Manufacturers Hyderabad.pptxPre Engineered  Building Manufacturers Hyderabad.pptx
Pre Engineered Building Manufacturers Hyderabad.pptx
 
Durg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTS
Durg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTSDurg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTS
Durg CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN durg ESCORTS
 
Falcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business PotentialFalcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business Potential
 
Buy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail AccountsBuy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail Accounts
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Kalyan Call Girl 98350*37198 Call Girls in Escort service book now
Kalyan Call Girl 98350*37198 Call Girls in Escort service book nowKalyan Call Girl 98350*37198 Call Girls in Escort service book now
Kalyan Call Girl 98350*37198 Call Girls in Escort service book now
 
WheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond InsightsWheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond Insights
 
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service AvailableNashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
 
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
 
Arti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdfArti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdf
 
joint cost.pptx COST ACCOUNTING Sixteenth Edition ...
joint cost.pptx  COST ACCOUNTING  Sixteenth Edition                          ...joint cost.pptx  COST ACCOUNTING  Sixteenth Edition                          ...
joint cost.pptx COST ACCOUNTING Sixteenth Edition ...
 
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
 
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
 
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
 
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
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
 

Boost.Timer