more stuff
This commit is contained in:
@@ -12,14 +12,14 @@ func init() {
|
||||
|
||||
type DiskStorage struct {
|
||||
stateFile string
|
||||
lastSave int64
|
||||
LastSaves map[uint64]int64
|
||||
lastSave time.Time
|
||||
LastSaves map[uint64]time.Time
|
||||
}
|
||||
|
||||
func NewDiskStorage(stateFile string) (*DiskStorage, error) {
|
||||
ret := &DiskStorage{
|
||||
stateFile: stateFile,
|
||||
LastSaves: make(map[uint64]int64),
|
||||
LastSaves: make(map[uint64]time.Time),
|
||||
}
|
||||
//err := ret.loadState()
|
||||
return ret, nil
|
||||
@@ -66,7 +66,7 @@ func NewDiskStorage(stateFile string) (*DiskStorage, error) {
|
||||
|
||||
func (s *DiskStorage) Store(id CartId, _ *CartGrain) error {
|
||||
// With the removal of the legacy message log, we only update the timestamp.
|
||||
ts := time.Now().Unix()
|
||||
ts := time.Now()
|
||||
s.LastSaves[uint64(id)] = ts
|
||||
s.lastSave = ts
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user