Timestamp data type

A variable of type probev_timestamp_t holds the return value from the timestamp ProbeVue function, which returns a timestamp in internal AIX® format.

The probev_timestamp_t type variable can be later passed as a parameter into the diff_time function that returns the difference between two timestamps. This data type can also be stored in an associative array either as a key or as a value.

Although the ProbeVue compiler does not type check when you use a long data type instead of the probev_timestamp_t data type for storing timestamps, if possible, avoid this usage.

The following operations are acceptable for a variable of the probev_timestamp_t type:

  • Can be explicitly initialized to zero.
    Note: A timestamp variable of global class or thread-local class is initialized to zero on start of the ProbeVue session.
  • Can be compared against zero. Timestamp values returned by the timestamp function are always greater than zero.
  • Can be compared against another timestamp variable. A later timestamp is guaranteed to be larger than an earlier timestamp.
  • Can be passed as a parameter to the diff_time function.
  • Can be printed using the printf or trace function.