add types.go

This commit is contained in:
nareix 2015-11-22 08:03:58 +08:00
parent 9ec3f04c16
commit 706b6e107b

14
atom/types.go Normal file
View File

@ -0,0 +1,14 @@
package atom
type Fixed uint32
type TimeStamp uint32
func IntToFixed(val int) Fixed {
return Fixed(val<<16)
}
func FixedToInt(val Fixed) int {
return int(val>>16)
}