Show
Ignore:
Timestamp:
06/09/10 14:00:40 (14 years ago)
Author:
mido
Message:

astyle applied all over the library

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/doc/tutorial/src/timer.cpp

    r477 r1064  
    88 
    99int main() { 
    10         //Declare the scalars used: 
    11         long i, sum, N; 
     10    //Declare the scalars used: 
     11    long i, sum, N; 
    1212 
    13         //Declare tt as an instance of the timer class: 
    14         Real_Timer tt; 
     13    //Declare tt as an instance of the timer class: 
     14    Real_Timer tt; 
    1515 
    16         //Initiate the variables: 
    17         N = 1000000; 
    18         sum = 0; 
     16    //Initiate the variables: 
     17    N = 1000000; 
     18    sum = 0; 
    1919 
    20         //Start and reset the timer: 
    21         tt.tic(); 
     20    //Start and reset the timer: 
     21    tt.tic(); 
    2222 
    23         //Do some processing 
    24         for ( i = 0; i < N; i++ ) { 
    25                 sum += i; 
    26         } 
     23    //Do some processing 
     24    for ( i = 0; i < N; i++ ) { 
     25        sum += i; 
     26    } 
    2727 
    28         // Print the elapsed time 
    29         tt.toc_print(); 
     28    // Print the elapsed time 
     29    tt.toc_print(); 
    3030 
    31         //Print the result of the processing: 
    32         cout << "The sum of all integers from 0 to " << N - 1 << " equals " << sum << endl; 
     31    //Print the result of the processing: 
     32    cout << "The sum of all integers from 0 to " << N - 1 << " equals " << sum << endl; 
    3333 
    34         //Exit program: 
    35         return 0; 
     34    //Exit program: 
     35    return 0; 
    3636 
    3737}