• svn URL

Use this URL in your Subversion client. Need more instructions?
 

Sample code which uses open source POCO C++ Libraries (POCO stands for POrtable COmponents). Some of them are available at http://poco.roundsquare.net. (Currently in Japanese)

root/trunk/0006_ScopedElapsedTime

User picture

Author: Setsu

Revision: 348 («Previous)


(July 02, 2010 10:27 UTC) Almost 2 years ago

Reset increment link option in release build for every VC++ project.

 
Name Date Rev. Commit message
bootstrap Wed, Jun 16 2010 15 [Setsu] 0006_ScopedElapsedTime
configure.in Wed, Jun 16 2010 15 [Setsu] 0006_ScopedElapsedTime
Makefile.am Wed, Jun 16 2010 15 [Setsu] 0006_ScopedElapsedTime
ReadMe.txt Wed, Jun 16 2010 15 [Setsu] 0006_ScopedElapsedTime
ScopedElapsedTime.cpp Wed, Jun 16 2010 15 [Setsu] 0006_ScopedElapsedTime
ScopedElapsedTime.h Wed, Jun 16 2010 15 [Setsu] 0006_ScopedElapsedTime
ScopedElapsedTime.sln Wed, Jun 16 2010 15 [Setsu] 0006_ScopedElapsedTime
ScopedElapsedTime.vcproj Fri, Jul 02 2010 142 [Setsu] Reset increment link option in release build for every VC...
ScopedElapsedTimeTest.cpp Wed, Jun 16 2010 15 [Setsu] 0006_ScopedElapsedTime
ScopedLogMessage.cpp Wed, Jun 16 2010 15 [Setsu] 0006_ScopedElapsedTime
ScopedLogMessage.h Wed, Jun 16 2010 15 [Setsu] 0006_ScopedElapsedTime

ReadMe.txt

//
//  ScopedElapsedTime ReadMe.txt
//
//  Created by Setsu on 4/28/10.
//  Copyright 2010 RoundSquare Inc. All rights reserved.
//

//----------------------------------------
// What is ScopedElapsedTime?
//----------------------------------------
Elapsed time measuring class which uses Poco::Stopwatch.
   http://pocoproject.org/docs/Poco.Stopwatch.html

//----------------------------------------
// Building on Linux
//----------------------------------------
1. bootstrap
     chmod +x bootstrap
     ./bootstrap
2. configure
    for debug build:
     CXXFLAGS="-g -D_DEBUG -Wall" ./configure --cache=/dev/null --prefix=/usr
    for release build:
     CXXFLAGS="-O2 -Wall" ./configure --cache=/dev/null --prefix=/usr
3. make
     make

//----------------------------------------
// Building on Mac OS X
//----------------------------------------
1. bootstrap
     cat bootstrap | sed s/libtoolize/glibtoolize/ > bootstrap.mac
     chmod +x bootstrap.mac
     ./bootstrap.mac
2. configure
    for debug build:
     CXXFLAGS="-g -D_DEBUG -Wall" ./configure --cache=/dev/null --prefix=/usr
    for release build:
     CXXFLAGS="-O2 -Wall" ./configure --cache=/dev/null --prefix=/usr
3. make
     make

//----------------------------------------
// Building on Windows
//  NOTE: Assuming environment variable POCO_BASE is properly defined.
//----------------------------------------
Open ScopedElapsedTime.sln file from VC++, then build and run it.

//----------------------------------------
// Console output for ScopedElapsedTimeTest
//  NOTE: Number in bracket indicates threadID
//----------------------------------------
[0] ScopedElapsedTime start [maximum precision check]
[0]  Elepsed time = 0.002mSec
[0] ScopedElapsedTime end
[0] ScopedElapsedTime start [Poco::Thread::sleep(300) check]
[0]  Elepsed time = 300.063mSec
[0] ScopedElapsedTime end