Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for logarithmicRankDiff (0.41 sec)

  1. pkg/controller/controller_utils.go

    	if t1.Time.IsZero() || t2.Time.IsZero() {
    		return t1.Time.IsZero()
    	}
    	return t1.After(t2.Time)
    }
    
    // logarithmicRankDiff calculates the base-2 logarithmic ranks of 2 timestamps,
    // compared to the current timestamp
    func logarithmicRankDiff(t1, t2, now metav1.Time) int64 {
    	d1 := now.Sub(t1.Time)
    	d2 := now.Sub(t2.Time)
    	r1 := int64(-1)
    	r2 := int64(-1)
    	if d1 > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 12 15:34:44 UTC 2024
    - 47.6K bytes
    - Viewed (0)
Back to top