java - Joda-Time remaining seconds? -
this has me stumped, new using joda api. how can print out remaining seconds?
datetime time1 = datetime.parse(c.lastbanktime); datetime time2 = new datetime(); seconds interval = seconds.secondsbetween(time1, time2); seconds mininterval = seconds.seconds(10); if(interval.isgreaterthan(mininterval)){ c.sendmessage("been 10 secs"); c.lastbanktime = new datetime().tostring(); } else{ c.sendmessage("please wait n seconds"); //how remaining seconds? }
i'm not sure mean 'remaining seconds', looking for?
mininterval.minus(interval).getseconds()
Comments
Post a Comment