...

Source file src/go.formulabun.club/srb2kart/conversion/time.go

Documentation: go.formulabun.club/srb2kart/conversion

     1  package conversion
     2  
     3  import "time"
     4  
     5  const Tic = time.Second / 35
     6  
     7  func TimeToFrames(time time.Duration) uint {
     8  	return uint(time.Abs() / Tic)
     9  }
    10  
    11  func FramesToTime(frames uint) time.Duration {
    12  	return time.Duration(frames * uint(Tic))
    13  }
    14  

View as plain text