tick_count Class

Summary

Class for computing wall-clock times.

Syntax

class tick_count;

Header

#include "tbb/tick_count.h"

Description

A tick_count is an absolute timestamp. Two tick_count objects may be subtracted to compute a  relative time tick_count::interval_t, which can be converted to seconds.

Example

using namespace tbb;
     
    void Foo() {
        tick_count t0 = tick_count::now();
        ...action being timed...
        tick_count t1 = tick_count::now();
        printf("time for action = %g seconds\n", (t1-t0).seconds() );
    }

Members

 namespace tbb {
     
        class tick_count {
        public:
            class interval_t;
            static tick_count now();
        };
     
        tick_count::interval_t  operator-( const tick_count& t1, 
                                           const tick_count& t0 );
    } // tbb