# Class CAOctetsPerSecond

java.lang.Object
com.io7m.cardant.client.basic.internal.CAOctetsPerSecond

public final class CAOctetsPerSecond extends Object
An octets-per-second calculator.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CAOctetsPerSecond(Clock inClock)`
  Create a new octets-per-second service.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(long octets)`
  Add a new sample
  `double`
  `average()`
  `boolean`
  `isReadyForMore()`
  `String`
  `toString()`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### CAOctetsPerSecond

    public CAOctetsPerSecond(Clock inClock)
    Create a new octets-per-second service.
    Parameters:
      `inClock` - The clock

- ## Method Details

  - ### isReadyForMore

    public boolean isReadyForMore()
    Returns:
      `true` if the service is ready for more samples

  - ### average

    public double average()
    Returns:
      The current average

  - ### add

    public void add(long octets)
    Add a new sample
    Parameters:
      `octets` - The number of octets received

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`