/** * Sets the timeticks value by milliseconds. * @param millis * sets the value as <code>setValue(millis/10)</code>. * @since 1.7 */ public void fromMilliseconds(long millis) { setValue(millis/10); } }
/** * Sets the timeticks value by milliseconds. * @param millis * sets the value as <code>setValue(millis/10)</code>. * @since 1.7 */ public void fromMilliseconds(long millis) { setValue(millis/10); } }
/** * Sets the timeticks value by milliseconds. * @param millis * sets the value as <code>setValue(millis/10)</code>. * @since 1.7 */ public void fromMilliseconds(long millis) { setValue(millis/10); } }
/** * Sets the {@code TimeTicks} value of the trap sender's notion of * its sysUpTime value when this trap has been generated. * * @param timeStamp * a long value. */ public void setTimestamp(long timeStamp) { checkV1TRAP(); this.timestamp.setValue(timeStamp); }
@Override /** * Sets the value of this TimeTicks instance from a string. * * @param value * a string representation of this value, which is * (a) is either an unsigned number or * (b) matches the format {@link FORMAT_PATTERN}. * @since 2.1.2 */ public final void setValue(String value) { try { long v = Long.parseLong(value); setValue(v); } catch (NumberFormatException nfe) { long v = 0; String[] num = value.split("[days :,\\.]"); int i = 0; for (String n : num) { if (n.length()>0) { long f = FORMAT_FACTORS[i++]; v += Long.parseLong(n)*f; } } setValue(v); } }
/** * Sets the {@code TimeTicks} value of the trap sender's notion of * its sysUpTime value when this trap has been generated. * * @param timeStamp * a long value. */ public void setTimestamp(long timeStamp) { checkV1TRAP(); this.timestamp.setValue(timeStamp); }
/** * Sets the <code>TimeTicks</code> value of the trap sender's notion of * its sysUpTime value when this trap has been generated. * * @param timeStamp * a long value. */ public void setTimestamp(long timeStamp) { checkV1TRAP(); this.timestamp.setValue(timeStamp); }
@Override /** * Sets the value of this TimeTicks instance from a string. * * @param value * a string representation of this value, which is * (a) is either an unsigned number or * (b) matches the format {@link FORMAT_PATTERN}. * @since 2.1.2 */ public final void setValue(String value) { try { long v = Long.parseLong(value); setValue(v); } catch (NumberFormatException nfe) { long v = 0; String[] num = value.split("[days :,\\.]"); int i = 0; for (String n : num) { if (n.length()>0) { long f = FORMAT_FACTORS[i++]; v += Long.parseLong(n)*f; } } setValue(v); } }
public void decodeBER(BERInputStream inputStream) throws IOException { BER.MutableByte type = new BER.MutableByte(); long newValue = BER.decodeUnsignedInteger(inputStream, type); if (type.getValue() != BER.TIMETICKS) { throw new IOException("Wrong type encountered when decoding TimeTicks: "+type.getValue()); } setValue(newValue); }
public void decodeBER(BERInputStream inputStream) throws IOException { BER.MutableByte type = new BER.MutableByte(); long newValue = BER.decodeUnsignedInteger(inputStream, type); if (type.getValue() != BER.TIMETICKS) { throw new IOException("Wrong type encountered when decoding TimeTicks: "+type.getValue()); } setValue(newValue); }
public void decodeBER(BERInputStream inputStream) throws IOException { BER.MutableByte type = new BER.MutableByte(); long newValue = BER.decodeUnsignedInteger(inputStream, type); if (type.getValue() != BER.TIMETICKS) { throw new IOException("Wrong type encountered when decoding TimeTicks: "+type.getValue()); } setValue(newValue); }
public void rowChanged(MOTableRowEvent event) { if (event.getRow() != null) { Snmp4jAgentHBCtrlEntryRow row = (Snmp4jAgentHBCtrlEntryRow) event.getRow(); if (row.getSnmp4jAgentHBCtrlLastChange() != null) { row.getSnmp4jAgentHBCtrlLastChange().setValue(sysUpTime.get().getValue()); } } }
public void rowChanged(MOTableRowEvent event) { if (event.getRow() != null) { Snmp4jAgentHBCtrlEntryRow row = (Snmp4jAgentHBCtrlEntryRow) event.getRow(); if (row.getSnmp4jAgentHBCtrlLastChange() != null) { row.getSnmp4jAgentHBCtrlLastChange().setValue(sysUpTime.get().getValue()); } } }
String upTime = nextOption(args, i++); v1TrapPDU.setTimestamp(Long.parseLong(upTime)); sysUpTime.setValue(Long.parseLong(upTime));
String upTime = nextOption(args, i++); v1TrapPDU.setTimestamp(Long.parseLong(upTime)); sysUpTime.setValue(Long.parseLong(upTime));