Optimize this by checking if nanos > 0 without allocating any objects like this:

    int nanos = PDataType.INTEGER.getCodec().decodeInt(ptr.getBuffer(),ptr.getOffset()+PDataType.LONG.getMaxLength()); // Skip ms part
    if (nanos > 0) {
        Timestamp roundedTs = new Timestamp(roundTime(ts.getTime() + 1));
        byte[] byteValue = getDataType().toBytes(roundedTs);
        ptr.set(byteValue);
    }
    return true; // Otherwise, just return with the eval of the first child, as this is the correct value