Name

tick_count::interval_t Class — Class for relative wall-clock time.

Synopsis

#include "tbb/tick_count.h"

class tick_count::interval_t;

Description

A tick_count::interval_t represents relative wall-clock time or duration.

Members provide for the accumulation and reduction of intervals by other interval_t values, and for the conversion of interval_t values into seconds.

Members

	namespace tbb {

	    class tick_count::interval_t {
	    public:
	        interval_t();
	        double seconds() const;
	        interval_t operator+=( const interval_t& i );
	        interval_t operator-=( const interval_t& i );
	    };

	    tick_count::interval_t operator+( const tick_count::interval_t& i,
	                                      const tick_count::interval_t& j );
	    tick_count::interval_t operator-( const tick_count::interval_t& i,
	                                      const tick_count::interval_t& j );

	} // tbb
interval_t()

Effects: constructs an interval_t representing a zero time duration.

doubleseconds()const

Returns: a time interval measured in seconds (can have noninteger values).

interval_t operator+=(const interval_t&i)

Effects: *this = *this+i.

Returns: a reference to *this after the addition.

interval_t operator-=(const interval_t&i)

Effects: *this = *this -i.

Returns: a reference to *this after the subtraction.

interval_t operator+(constinterval_t&i,const interval_t&j)

Returns: an interval_t representing the sum of intervals i and j.

interval_t operator-(constinterval_t&i,const interval_t&j)

Returns: an interval_t representing the difference between intervals i and j.

Get Intel Threading Building Blocks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.