// automatically generated by the FlatBuffers compiler, do not modify

import * as flatbuffers from 'flatbuffers';

export class Time {
  bb: flatbuffers.ByteBuffer|null = null;
  bb_pos = 0;
  __init(i:number, bb:flatbuffers.ByteBuffer):Time {
  this.bb_pos = i;
  this.bb = bb;
  return this;
}

/**
 * 	Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z
 */
sec():bigint {
  return this.bb!.readUint64(this.bb_pos);
}

/**
 * Nano-second fractions from 0 to 999,999,999 inclusive
 */
nsec():number {
  return this.bb!.readUint32(this.bb_pos + 8);
}

static sizeOf():number {
  return 16;
}

static createTime(builder:flatbuffers.Builder, sec: bigint, nsec: number):flatbuffers.Offset {
  builder.prep(8, 16);
  builder.pad(4);
  builder.writeInt32(nsec);
  builder.writeInt64(sec);
  return builder.offset();
}

}
