[SNMP4J] Convert long to int?

Joel Goguen jtgoguen at gmail.com
Tue Jun 5 00:17:35 CEST 2007


I'm having some trouble creating a TimeTicks object.  The constructor
says to pass a long value, which I'm doing by calling
System.currentTimeMillis(), which is required since the device
receiving my traps displays the TimeTicks field as the current system
time.  However, when I pass this long value to TimeTicks, I get an
IllegalArgumentException, since the current system time is greater
than 2^32 - 1.  Is there any way to convert a long to fit into
TimeTicks that would preserve the current system time?

-- 
Joel Goguen
http://jgoguen.net/



More information about the SNMP4J mailing list