/*
go.cypherpunks.ru/tai64n -- Pure Go TAI64N implementation
-Copyright (C) 2020 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2020-2021 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
type TAI64N [Size]byte
-func FromTime(t time.Time, tai *TAI64N) {
- binary.BigEndian.PutUint64(tai[:], uint64(Base)+uint64(t.Unix()))
- binary.BigEndian.PutUint32(tai[8:], uint32(t.Nanosecond()))
+func FromTime(src time.Time, dst *TAI64N) {
+ binary.BigEndian.PutUint64(dst[:], uint64(Base)+uint64(src.Unix()))
+ binary.BigEndian.PutUint32(dst[8:], uint32(src.Nanosecond()))
}
func ToTime(tai []byte) time.Time {