| Home | Libraries | People | FAQ | More

## Class usduration

boost::interprocess::usduration

## Synopsis

    // In header: <boost/interprocess/timed_utils.hpp>

    class usduration {
    public:

      // public member functions
      explicit usduration(boost::uint64_t = 0u);
      boost::uint64_t get_microsecs() const;
      bool operator<(const usduration &) const;
      bool operator>(const usduration &) const;
      bool operator<=(const usduration &) const;
      bool operator>=(const usduration &) const;
    };

## Description

Describes a simple duration type with microsecond resolution that can be used with the ustime time-point utility to call timed functions of Boost.Interprocess' synchronization classes that expect a duration type (wait_for, lock_for...)

### `usduration` public member functions

1.     explicit usduration(boost::uint64_t microsecs = 0u);

   Constructs a duration type that stores microseconds from the passed count

2.     boost::uint64_t get_microsecs() const;

   Returns the stored microsecond count

3.     bool operator<(const usduration & other) const;

4.     bool operator>(const usduration & other) const;

5.     bool operator<=(const usduration & other) const;

6.     bool operator>=(const usduration & other) const;