Cascade TextLogger: Version 4.0
Prev |  | Next

# tolerance

tolerance -- Sets the maximum gap between timestamps of any two points.

## Syntax

    (tolerance seconds nanoseconds)

## Arguments

`seconds`

  An integer number of seconds.

`nanoseconds`

  An integer number of nanoseconds.

## Description

The tolerance command sets timestamp tolerance. This is the maximum gap between the timestamps of any two points on a line. Whenever a point is to be logged, the Cascade TextLogger checks the current log line in the buffer. If the timestamp gap between this point and any other point in the buffer has exceeded the tolerance, the existing line in the buffer is written first, and then this point is logged on a new line in the buffer.

The tolerance is globally applied to all logs all the time. There is no way to prevent it from being applied, but you can effectively ignore it by setting it to a very high number. The default tolerance is one millisecond.

## See Also

collect, timestamp

## Example

This example shows two files that were generated identically, except for using the two different tolerances shown here. To illustrate the point, the `(collect any)` command is applied to all logs.

        (tolerance 0 30000)
        (tolerance 2 0)
        (collect any)

Here, with the tolerance at 30000 nanoseconds, each new data point occurs outside the tolerance, and thus forces a new line of data to be written.

        Level readings for Oct 12, 2000:

                           l1  l2  l3
        15:43:0195 Levels: 52  *   *
        15:43:0198 Levels: 45  *   *
        15:43:0200 Levels: 63  *   *
        15:43:0203 Levels: *   80  *
        15:43:0205 Levels: *   *   89
        15:43:0208 Levels: 72  *   *
        15:43:0210 Levels: *   81  *
        15:43:0213 Levels: *   *   90

Here, on the other hand, with the tolerance set to 2 seconds, the points `l1`, `l2`, and `l3` all happen to fall within the tolerance, and are thus recorded on the same line. Notice that the point `l1` gets a new line each time its value changes, even though the changes occur within the tolerance time.

        Level readings for Oct 12, 2000:

                           l1  l2  l3
        15:41:5385 Levels: 52  *   *
        15:41:5388 Levels: 45  *   *
        15:41:5395 Levels: 63  80  89
        15:41:5403 Levels: 72  81  90

Prev | Home | Next
timestamp | Up | usegmt

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.