Time fields

By default, a time field in the first record created by the operator is set to 00:00:00 (midnight). The field in each successive record generated by the operator is incremented by one second. After reaching a time of 23:59:59, time fields wrap back to 00:00:00.

You can use the cycle and random options with time fields. See Numeric fields for information on these options. When using these options, you specify the options values in numbers of seconds. For example, to set the value for a time field to a random value between midnight and noon, you use the following syntax:


record (
       transTime:time {random={limit=43200, seed=83344}};
   )

For a time field, midnight corresponds to an initial value of 0 and noon corresponds to 43,200 seconds (12 hours * 60 minutes * 60 seconds).

In addition, you can use the scale and invalids options with time fields.

The scale option allows you to specify a multiplier to the increment value for time. The syntax of this options is:


scale = factor

The increment value is multiplied by factor before being added to the field. For example, the following schema generates two time fields:


record (
       timeMinutes:time {scale=60};
       timeSeconds:time;
   )

In this example, the first field increments by 60 seconds per record (one minute), and the second field increments by seconds.

You use the invalids option to specify the percentage of invalid time fields generated:


invalids = percentage

where percentage is a value between 0.0 and 100.0. The following schema generates two time fields with different percentages of invalid values:


record (
      timeMinutes:time {scale=60, invalids=10};
      timeSeconds:time {invalids=15};
      )