// automatically generated by stateify.

package tcp

import (
	"context"

	"github.com/sagernet/gvisor/pkg/state"
)

func (offset *TSOffset) StateTypeName() string {
	return "pkg/tcpip/internal/tcp.TSOffset"
}

func (offset *TSOffset) StateFields() []string {
	return []string{
		"milliseconds",
	}
}

func (offset *TSOffset) beforeSave() {}

// +checklocksignore
func (offset *TSOffset) StateSave(stateSinkObject state.Sink) {
	offset.beforeSave()
	stateSinkObject.Save(0, &offset.milliseconds)
}

func (offset *TSOffset) afterLoad(context.Context) {}

// +checklocksignore
func (offset *TSOffset) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &offset.milliseconds)
}

func init() {
	state.Register((*TSOffset)(nil))
}
