# automatically generated by the FlatBuffers compiler, do not modify

# namespace: foxglove

import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()

class Time(object):
    __slots__ = ['_tab']

    @classmethod
    def SizeOf(cls):
        return 8

    # Time
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z
    # Time
    def Sec(self): return self._tab.Get(flatbuffers.number_types.Uint32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0))
    # Nano-second fractions from 0 to 999,999,999 inclusive
    # Time
    def Nsec(self): return self._tab.Get(flatbuffers.number_types.Uint32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4))

def CreateTime(builder, sec, nsec):
    builder.Prep(4, 8)
    builder.PrependUint32(nsec)
    builder.PrependUint32(sec)
    return builder.Offset()
