Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More counter fixes #3

Merged
merged 3 commits into from
Jul 6, 2011
Merged

More counter fixes #3

merged 3 commits into from
Jul 6, 2011

Commits on Jul 6, 2011

  1. Removed count() function from counter prototype.

    `count' was both an attribute and a prototype of Counter.  You can't
    have both (count() never worked anyway), and there's not much sense in
    providing an accessor here, so it's been removed.
    Michael S. Fischer committed Jul 6, 2011
    Configuration menu
    Copy the full SHA
    f3b52cd View commit details
    Browse the repository at this point in the history
  2. Additional checking for counters.

    This patch adds some additional checking for counters:
    
    * Wrap counters around at 2^32.  Most graphing software (RRDtool etc.)
      can deal with this properly.  Unfortunately wrapping at 2^64 isn't
      possible because JS has a maximum integer resolution of 2^53.
    
    * Don't allow counters to be decremented below 0.
    Michael S. Fischer committed Jul 6, 2011
    Configuration menu
    Copy the full SHA
    7af921b View commit details
    Browse the repository at this point in the history
  3. More counter fixes

    * Handle counter wrapping properly when val > 1.
    * Prevent counter from being decremented below 0.
    Michael S. Fischer committed Jul 6, 2011
    Configuration menu
    Copy the full SHA
    5672088 View commit details
    Browse the repository at this point in the history