Explorar o código

timestamp in protocol

v2ray %!s(int64=9) %!d(string=hai) anos
pai
achega
9e68c150e1
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      common/protocol/time.go

+ 11 - 0
common/protocol/time.go

@@ -0,0 +1,11 @@
+package protocol
+
+import (
+	"github.com/v2ray/v2ray-core/common/serial"
+)
+
+type Timestamp int64
+
+func (this Timestamp) Bytes() []byte {
+	return serial.Int64Literal(this).Bytes()
+}