com.tibco.n2.service.adapter.logging

## Class CommonLogging

- java.lang.Object
- - com.tibco.n2.service.adapter.logging.CommonLogging

-     public class CommonLogging
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.text.FieldPosition` | `fieldPos` Field position to use with the date formatter.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommonLogging()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.Calendar` | `createStartDate()` Returns a new Calendar object set to 'now'.
    `protected long` | `getDuration(java.util.Calendar startDate)` Returns the duration, in milliseconds, since the given date/time value and now.
    `protected long` | `getDuration(java.util.Calendar aStartDate, java.util.Calendar aEndDate)` Returns the duration, in milliseconds, since the given start date/time value and given end date/time.
    `protected long` | `getDuration(long aStartTime, long aEndTime)` Returns the duration, in milliseconds, since the given start date/time value and given end date/time.

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### fieldPos

          protected java.text.FieldPosition fieldPos

      Field position to use with the date formatter.

  - ### Constructor Detail

    - #### CommonLogging

          public CommonLogging()

  - ### Method Detail

    - #### createStartDate

          public static java.util.Calendar createStartDate()

      Returns a new Calendar object set to 'now'.

    - #### getDuration

          protected long getDuration(java.util.Calendar startDate)

      Returns the duration, in milliseconds, since the given date/time value and now.
      Parameters:
        `startDate` - the date/time at which the duration started.
      Returns:
        the duration in milliseconds since the given date.

    - #### getDuration

          protected long getDuration(java.util.Calendar aStartDate,
                                     java.util.Calendar aEndDate)

      Returns the duration, in milliseconds, since the given start date/time value and given end date/time.
      Parameters:
        `aStartDate` - the date/time at which the duration started.
        `aEndDate` - the date/time at which the duration ended.
      Returns:
        the duration in milliseconds between the given dates.

    - #### getDuration

          protected long getDuration(long aStartTime,
                                     long aEndTime)

      Returns the duration, in milliseconds, since the given start date/time value and given end date/time. The date/time values are given as milliseconds since the system delta (midnight, Jan 01, 1970)
      Parameters:
        `aStartDate` - the date/time at which the duration started.
        `aEndDate` - the date/time at which the duration ended.
      Returns:
        the duration in milliseconds between the given dates.

Copyright © 2018 TIBCO Software Inc. All Rights Reserved.