Logger("%s: %s (at %s, %s since last step, %s since start)\n",s.Name,text,t.Format(time.RFC3339),t.Sub(s.LastStep).String(),t.Sub(s.Start).String())
}
func(s*Stepper)Step(descriptionstring){
if!Enabled{
return
}
ifs.Completion!=(time.Time{}){
Logger("%s: already completed all tasks.\n")
return
}
t:=time.Now()
Logger("%s: completed %s at %s (%s)\n",s.Name,description,t.Format(time.RFC3339),t.Sub(s.LastStep).String())
s.LastStep=t
}
func(s*Stepper)Complete(){
if!Enabled{
return
}
ifs.Completion!=(time.Time{}){
Logger("%s: already completed all tasks.\n")
return
}
t:=time.Now()
Logger("%s: completed all tasks at %s (%s since last step; total time: %s)\n",s.Name,t.Format(time.RFC3339),t.Sub(s.LastStep).String(),t.Sub(s.Start).String())