all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1,27 @@
package main
import (
"log"
"os"
"strconv"
"sync"
"time"
)
func main() {
lg := log.New(os.Stdout, "", 0)
var wg sync.WaitGroup
wg.Add(len(os.Args) - 1)
for _, a := range os.Args[1:] {
if i, err := strconv.ParseInt(a, 10, 64); err != nil {
lg.Print(err)
wg.Done()
} else {
time.AfterFunc(time.Duration(i*int64(time.Second)), func() {
lg.Print(i)
wg.Done()
})
}
}
wg.Wait()
}