diff --git a/prefetch.go b/prefetch.go index 2a1ad64..d257ad0 100644 --- a/prefetch.go +++ b/prefetch.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "path" + "time" "path/filepath" "strconv" "strings" @@ -12,6 +13,7 @@ import ( ) func PrefetchImages(confImgPath string, ExhaustPath string, QUALITY string) { + var sTime = time.Now() // maximum ongoing prefetch is depending on your core of CPU log.Infof("Prefetching using %d cores", jobs) var finishChan = make(chan int, jobs) @@ -41,7 +43,8 @@ func PrefetchImages(confImgPath string, ExhaustPath string, QUALITY string) { if err != nil { log.Debug(err) } - + elapsed := time.Since(sTime) _, _ = fmt.Fprintf(os.Stdout, "Prefetch completeY(^_^)Y\n\n") + _, _ = fmt.Fprintf(os.Stdout, "Convert %d file in %s (^_^)Y\n\n", count, elapsed) }