]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[CLEANUP] task: distinguish between clock ticks and timers
authorWilly Tarreau <w@1wt.eu>
Sun, 8 Mar 2009 14:53:06 +0000 (15:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 8 Mar 2009 14:58:07 +0000 (15:58 +0100)
commitd0a201b35ce35555ea7cce172dde27c528ec038a
tree0d96a208bc8db85db327646b8304b0a2ee7c75ce
parent721fdbc381531d6f8bdc39065126482150f200a3
[CLEANUP] task: distinguish between clock ticks and timers

Timers are unsigned and used as tree positions. Ticks are signed and
used as absolute date within current time frame. While the two are
normally equal (except zero), it's important not to confuse them in
the code as they are not interchangeable.

We add two inline functions to turn each one into the other.

The comments have also been moved to the proper location, as it was
not easy to understand what was a tick and what was a timer unit.
include/common/ticks.h
include/proto/task.h
include/types/task.h
src/session.c
src/task.c