Skip to main content

Random.time

Random.timeminmax

Group: Random

Documentation

Return a Time_Of_Day between start_time and end_time (inclusive).

The generated time is at a granularity of 1 second. Random values are generated for hours, minutes and seconds. The nanoseconds field is always 0.

Arguments

  • min: The lower bound of the range to pick from (inclusive).
  • max: The upper bound of the range to pick from (inclusive).

Examples

Generate a random time.

      import Standard.Base.Random.Random

start = Time_Of_Day.new 8 12 15
end = Time_Of_Day.new 9 40 2
t = Random.time start end