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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -