Show
Ignore:
Timestamp:
11/11/08 17:21:04 (5 years ago)
Author:
robert
Message:

Added timing stats

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgmemorytest/osgmemorytest.cpp

    r9143 r9144  
    376376    GLObjects glObjects; 
    377377 
     378    osg::Timer_t startTick = osg::Timer::instance()->tick(); 
     379 
    378380    int numContextIterations = 0; 
    379381    int numGLObjectIterations = 0; 
     
    429431    catch(const char* errorString) 
    430432    { 
    431         printf("\nException caught, contexts completed = %i, gl objects successfully applied =%i, error = %s\n\n",numContextIterations, numGLObjectsApplied, errorString); 
     433        printf("\nException caught, contexts completed = %i, gl objects successfully applied = %i, error = %s\n\n",numContextIterations, numGLObjectsApplied, errorString); 
    432434        return 1; 
    433435    } 
    434436    catch(...) 
    435437    { 
    436         printf("\nException caught, contexts completed = %i, gl objects successfully applied =%i\n\n",numContextIterations, numGLObjectsApplied); 
     438        printf("\nException caught, contexts completed = %i, gl objects successfully applied = %i\n\n",numContextIterations, numGLObjectsApplied); 
    437439        return 1; 
    438440    } 
    439441 
    440     printf("\nSuccessful completion, contexts created = %i, gl objects applied =%i\n\n",numContextIterations, numGLObjectsApplied); 
    441      
     442    osg::Timer_t endTick = osg::Timer::instance()->tick(); 
     443 
     444    printf("\nSuccessful completion, contexts created = %i, gl objects applied = %i\n",numContextIterations, numGLObjectsApplied); 
     445    printf("Duration = %f seconds.\n\n",osg::Timer::instance()->delta_s(startTick, endTick)); 
     446     
     447 
    442448    return 0; 
    443449}