mirror of https://bitbucket.org/ausocean/av.git
psi: using array in TimeBytes()
This commit is contained in:
parent
404a2b6c99
commit
f7991cd0af
|
@ -37,10 +37,10 @@ import (
|
||||||
|
|
||||||
// timeBytes takes a timestamp as an uint64 and converts to an 8 byte slice -
|
// timeBytes takes a timestamp as an uint64 and converts to an 8 byte slice -
|
||||||
// allows for updating of timestamp in pmt time descriptor.
|
// allows for updating of timestamp in pmt time descriptor.
|
||||||
func TimeBytes(t uint64) (s []byte) {
|
func TimeBytes(t uint64) []byte {
|
||||||
s = make([]byte, timeDataSize)
|
var s [timeDataSize]byte
|
||||||
binary.BigEndian.PutUint64(s[:], t)
|
binary.BigEndian.PutUint64(s[:], t)
|
||||||
return s
|
return s[:]
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChkTime takes a psi as a byte slice and checks to see if it has a time descriptor
|
// ChkTime takes a psi as a byte slice and checks to see if it has a time descriptor
|
||||||
|
|
Loading…
Reference in New Issue