Function
NewPopulatedTimestamp
(r randyTimestamp, easy bool)
Source from the content-addressed store, hash-verified
| 130 | return offset + 1 |
| 131 | } |
| 132 | func NewPopulatedTimestamp(r randyTimestamp, easy bool) *Timestamp { |
| 133 | this := &Timestamp{} |
| 134 | this.WallTime = int64(r.Int63()) |
| 135 | if r.Intn(2) == 0 { |
| 136 | this.WallTime *= -1 |
| 137 | } |
| 138 | this.Logical = int32(r.Int31()) |
| 139 | if r.Intn(2) == 0 { |
| 140 | this.Logical *= -1 |
| 141 | } |
| 142 | if !easy && r.Intn(10) != 0 { |
| 143 | } |
| 144 | return this |
| 145 | } |
| 146 | |
| 147 | type randyTimestamp interface { |
| 148 | Float32() float32 |
Callers
nothing calls this directly
Tested by
no test coverage detected