include pid in sleep response

This commit is contained in:
Naitik Shah 2013-03-25 14:54:13 -07:00
parent 308a01b46b
commit 07af98f40b

View File

@ -7,6 +7,7 @@ import (
"fmt"
"github.com/daaku/go.grace/gracehttp"
"net/http"
"os"
"time"
)
@ -36,10 +37,11 @@ func newHandler(name string) http.Handler {
time.Sleep(duration)
fmt.Fprintf(
w,
"%s started at %s slept for %d nanoseconds.\n",
"%s started at %s slept for %d nanoseconds from pid %d.\n",
name,
now,
duration.Nanoseconds(),
os.Getpid(),
)
})
return mux