I run example B both playground and my linux(amd64) node, behavior is
different
At playground, function A, B, C run immediately, then program end
immediately
At my linux node, function A, B, C run immediately, but program end after
wait 5 seconds
I confuse why function A and C never sleep 5 se
you should use Sub function
Time include two part. Nanosecond method just return field of nsec. not
nanoseconds since from 1970
type Time struct {
// sec gives the number of seconds elapsed since
// January 1, year 1 00:00:00 UTC.
sec int64
// nsec specifies a non-negative nanosecond
// offset
It is OS behavior. not Go
the minimum resolution for timestamp was one second in ext3 filesytem
On Friday, November 25, 2016 at 1:39:35 PM UTC+8, fei@gmail.com wrote:
>
> package main
>
> import (
>"os"
>"time"
>"fmt"
> )
>
>
> func main() {
>t1 := time.Now()
>fmt.Println(t