Skip to Main Content
Intel Threading Building Blocks
book

Intel Threading Building Blocks

by James Reinders
July 2007
Intermediate to advanced content levelIntermediate to advanced
332 pages
10h 4m
English
O'Reilly Media, Inc.
Content preview from Intel Threading Building Blocks

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.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Intel® Xeon Phi™ Coprocessor Architecture and Tools: The Guide for Application Developers

Intel® Xeon Phi™ Coprocessor Architecture and Tools: The Guide for Application Developers

Rezaur Rahman

Publisher Resources

ISBN: 9780596514808Errata Page