DateTime GetDateTime(SaAttributes attrs, zpl_attr_t attr) { var bytes = attrs.Get(attr); ulong seconds = Program.ToStruct <ulong>(bytes.SubSegment(0, sizeof(ulong))); ulong nanosecs = Program.ToStruct <ulong>(bytes.SubSegment(sizeof(ulong), sizeof(ulong))); return(sEpoc.AddSeconds(seconds).AddTicks((long)(nanosecs / 100))); }
public T Get <T>(zpl_attr_t attr) where T : struct { return(Program.ToStruct <T>(mEntries[attr])); }
public SaLayoutEntry(zpl_attr_t attr, int offset, int size) { this.Attr = attr; this.Offset = offset; this.Size = size; }
public ArraySegment <byte> Get(zpl_attr_t attr) { return(mEntries[attr]); }