[For complete, up-to-date TBB information visit: http://www.ThreadingBuildingBlocks.org]

TbbRef (Ver. 20): 7.1 tick_count Class

7.1 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();

[For complete, up-to-date TBB information visit: http://www.ThreadingBuildingBlocks.org]