github.com/hamba/timex@v1.2.1-0.20240304044353-56d3de3a9ed9/mono/time_test.go (about)

     1  package mono_test
     2  
     3  import (
     4  	"testing"
     5  	"time"
     6  
     7  	"github.com/hamba/timex/mono"
     8  	"github.com/stretchr/testify/assert"
     9  )
    10  
    11  func TestSince(t *testing.T) {
    12  	then := mono.Now() - 1000
    13  
    14  	d := mono.Since(then)
    15  
    16  	assert.True(t, time.Duration(1000) <= d)
    17  }