gitlab.com/evatix-go/core@v1.3.55/cmd/main/timeCompareTest.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"time"
     6  
     7  	"gitlab.com/evatix-go/core/corecmp"
     8  )
     9  
    10  func timeCompareTest() {
    11  	now := time.Now()
    12  	now21 := time.Now()
    13  	now2 := now21.Add(time.Duration(600000))
    14  	fmt.Println(now)
    15  	fmt.Println(now2)
    16  	// fmt.Println(corecomparator.Byte(1,2))
    17  	// fmt.Println(corecomparator.Byte(2,2))
    18  	// fmt.Println(corecomparator.Byte(3,2))
    19  	// fmt.Println(corecomparator.Byte(3,3))
    20  	fmt.Println("time.Now, now = ", corecmp.Time(time.Now(), now))
    21  	fmt.Println("now, now = ", corecmp.Time(now, now))
    22  	fmt.Println("now, now2 = ", corecmp.Time(now, now2))
    23  	fmt.Println("now2, now2 = ", corecmp.Time(now2, now2))
    24  	fmt.Println("now2, now = ", corecmp.Time(now2, now))
    25  	fmt.Println("now2, time.now = ", corecmp.Time(time.Now().Add(600001), now2))
    26  }