Skip to content

Commit

Permalink
Simplify stats constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
tsenart committed Feb 25, 2014
1 parent e1c4fab commit 065e1a4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions stressdisk.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ type Stats struct {

// NewStats cretates an initialised Stats
func NewStats() *Stats {
stats := Stats{}
stats.start = time.Now()
return &stats
return &Stats{start: time.Now()}
}

// String convert the Stats to a string for printing
Expand Down

0 comments on commit 065e1a4

Please sign in to comment.