Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestMonotonicAdd (0.23 sec)

  1. src/time/mono_test.go

    	no("tm.In(UTC)", tm.In(UTC))
    	no("tm.Local()", tm.Local())
    	no("tm.UTC()", tm.UTC())
    	no("tm.Round(2)", tm.Round(2))
    	no("tm.Truncate(2)", tm.Truncate(2))
    }
    
    func TestMonotonicAdd(t *testing.T) {
    	tm := Unix(1486057371, 123456)
    	SetMono(&tm, 123456789012345)
    
    	t2 := tm.Add(1e8)
    	if t2.Nanosecond() != 100123456 {
    		t.Errorf("t2.Nanosecond() = %d, want 100123456", t2.Nanosecond())
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 19 17:10:49 UTC 2022
    - 8.3K bytes
    - Viewed (0)
Back to top