| | |
| | | if(sp != null) { |
| | | //需要判断一下是否过期 |
| | | Calendar ca = Calendar.getInstance(); |
| | | long curTime = ca.getTimeInMillis(); |
| | | //加上一秒钟提前过期 |
| | | long curTime = ca.getTimeInMillis()+1000L; |
| | | ca.setTime(sp.getCreateTime()); |
| | | ca.add(Calendar.SECOND, Integer.parseInt(sp.getParamValue1())); |
| | | if(curTime <= ca.getTimeInMillis()) { |
| | | if(curTime < ca.getTimeInMillis()) { |
| | | needGetAgain = 0; |
| | | } |
| | | } |
| | |
| | | if(sp != null) { |
| | | //需要判断一下是否过期 |
| | | Calendar ca = Calendar.getInstance(); |
| | | long curTime = ca.getTimeInMillis(); |
| | | //加上1秒钟,提前过期 |
| | | long curTime = ca.getTimeInMillis()+1000L; |
| | | ca.setTime(sp.getCreateTime()); |
| | | ca.add(Calendar.SECOND, Integer.parseInt(sp.getParamValue1())); |
| | | if(curTime < ca.getTimeInMillis()) { |