tick_count クラス

概要

時計時間計算用のクラス。

構文

class tick_count;

ヘッダー

#include "tbb/tick_count.h"

説明

tick_count は、絶対タイムスタンプです。tick_count オブジェクトを別のオブジェクトから引いて相対時間 tick_count::interval_t を計算します。この時間は秒に変換できます。

using namespace tbb;
     
    void Foo() {
        tick_count t0 = tick_count::now();
        ...action being timed...
        tick_count t1 = tick_count::now();
        printf("アクションの時間 = %g 秒\n", (t1-t0).seconds() );
    }

メンバー

 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