Skip to content

Commit

Permalink
hlc: remove Timestamp.WithSynthetic method
Browse files Browse the repository at this point in the history
Informs #101938.

This is now unused.

Release note: None
  • Loading branch information
nvanbenschoten committed Jan 9, 2024
1 parent 1b4f26e commit 4288a77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 0 additions & 6 deletions pkg/util/hlc/timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,6 @@ func (t Timestamp) Add(wallTime int64, logical int32) Timestamp {
return s
}

// WithSynthetic returns a timestamp with the Synthetic flag set to val.
func (t Timestamp) WithSynthetic(val bool) Timestamp {
t.Synthetic = val
return t
}

// Clone return a new timestamp that has the same contents as the receiver.
func (t Timestamp) Clone() *Timestamp {
return &t
Expand Down
4 changes: 3 additions & 1 deletion pkg/util/hlc/timestamp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ func makeTS(walltime int64, logical int32) Timestamp {
}

func makeSynTS(walltime int64, logical int32) Timestamp {
return makeTS(walltime, logical).WithSynthetic(true)
ts := makeTS(walltime, logical)
ts.Synthetic = true
return ts
}

func TestCompare(t *testing.T) {
Expand Down

0 comments on commit 4288a77

Please sign in to comment.